command/build: Use PrefixedUi for each build

This commit is contained in:
Mitchell Hashimoto 2013-05-21 15:10:51 -07:00
parent 2c4a873a5f
commit 6a98134682
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package build
import (
"fmt"
"github.com/mitchellh/packer/packer"
"io/ioutil"
"log"
@ -51,6 +52,15 @@ func (Command) Run(env packer.Environment, args []string) int {
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
for _, b := range builds {
log.Printf("Preparing build: %s\n", b.Name())