command/build: Use PrefixedUi for each build
This commit is contained in:
parent
2c4a873a5f
commit
6a98134682
|
@ -1,6 +1,7 @@
|
||||||
package build
|
package build
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"github.com/mitchellh/packer/packer"
|
"github.com/mitchellh/packer/packer"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
@ -51,6 +52,15 @@ func (Command) Run(env packer.Environment, args []string) int {
|
||||||
builds = append(builds, build)
|
builds = append(builds, build)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compile all the UIs for the builds
|
||||||
|
buildUis := make(map[string]packer.Ui)
|
||||||
|
for _, b := range builds {
|
||||||
|
buildUis[b.Name()] = &packer.PrefixedUi{
|
||||||
|
fmt.Sprintf("==> %s", b.Name()),
|
||||||
|
env.Ui(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Prepare all the builds
|
// Prepare all the builds
|
||||||
for _, b := range builds {
|
for _, b := range builds {
|
||||||
log.Printf("Preparing build: %s\n", b.Name())
|
log.Printf("Preparing build: %s\n", b.Name())
|
||||||
|
|
Loading…
Reference in New Issue