command/build: Say if no artifacts were created

This commit is contained in:
Mitchell Hashimoto 2013-06-18 22:53:30 -07:00
parent 154c17163b
commit 4912b485e2
2 changed files with 3 additions and 1 deletions

View File

@ -250,6 +250,8 @@ func (c Command) Run(env packer.Environment, args []string) int {
env.Ui().Say(message.String()) env.Ui().Say(message.String())
} }
} }
} else {
env.Ui().Say("\n==> Builds finished but no artifacts were created.")
} }
return 0 return 0

View File

@ -155,7 +155,7 @@ func (b *coreBuild) Run(ui Ui, cache Cache) ([]Artifact, error) {
builderArtifact, err := b.builder.Run(ui, hook, cache) builderArtifact, err := b.builder.Run(ui, hook, cache)
if err != nil { if err != nil {
return artifacts, err return nil, err
} }
errors := make([]error, 0) errors := make([]error, 0)