Commit 0efabb66 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

command/validate: better logging

parent 72178657
......@@ -66,6 +66,7 @@ func (c Command) Run(env packer.Environment, args []string) int {
buildNames := tpl.BuildNames()
builds := make([]packer.Build, 0, len(buildNames))
for _, buildName := range buildNames {
log.Printf("Creating build from template for: %s", buildName)
build, err := tpl.Build(buildName, components)
if err != nil {
errs = append(errs, fmt.Errorf("Build '%s': %s", buildName, err))
......@@ -77,6 +78,7 @@ func (c Command) Run(env packer.Environment, args []string) int {
// Check the configuration of all builds
for _, b := range builds {
log.Printf("Preparing build: %s", b.Name())
err := b.Prepare()
if err != nil {
errs = append(errs, fmt.Errorf("Errors validating build '%s'. %s", b.Name(), err))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment