command/build: Output nothign if artifact is nil

This commit is contained in:
Mitchell Hashimoto 2013-06-05 15:36:41 -07:00
parent 9bb24e6d90
commit 009b509138
1 changed files with 6 additions and 1 deletions

View File

@ -183,7 +183,12 @@ func (c Command) Run(env packer.Environment, args []string) int {
env.Ui().Say("\n==> The build completed! The artifacts created were:")
for name, artifact := range artifacts {
env.Ui().Say(fmt.Sprintf("--> %s:", name))
env.Ui().Say(artifact.String())
if artifact != nil {
env.Ui().Say(artifact.String())
} else {
env.Ui().Say("<nothing>")
}
}
return 0