From 6a98134682e5eed85be9ab7bbcdd43f6ae524388 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 21 May 2013 15:10:51 -0700 Subject: [PATCH] command/build: Use PrefixedUi for each build --- command/build/command.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/command/build/command.go b/command/build/command.go index c37933c77..02874d325 100644 --- a/command/build/command.go +++ b/command/build/command.go @@ -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())