command/build: include the build name in the err/success output

This commit is contained in:
Mitchell Hashimoto 2013-06-27 22:26:48 -04:00
parent 2f98ab2018
commit a000934154
1 changed files with 2 additions and 2 deletions

View File

@ -187,10 +187,10 @@ func (c Command) Run(env packer.Environment, args []string) int {
runArtifacts, err := b.Run(ui, env.Cache())
if err != nil {
ui.Error(fmt.Sprintf("Build errored: %s", err))
ui.Error(fmt.Sprintf("Build '%s' errored: %s", name, err))
errors[name] = err
} else {
ui.Say("Build finished.")
ui.Say(fmt.Sprintf("Build '%s' finished.", name))
artifacts[name] = runArtifacts
}
}(b)