Commit 5c02bd3d authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: better error message for bad provisioner only/except

parent 15b48bb7
......@@ -273,7 +273,10 @@ func ParseTemplate(data []byte) (t *Template, err error) {
// Verify that the only settings are good
if errs := raw.TemplateOnlyExcept.Validate(t.Builders); len(errs) > 0 {
errors = append(errors, errs...)
for _, err := range errs {
errors = append(errors,
fmt.Errorf("provisioner %d: %s", i+1, err))
}
}
raw.RawConfig = v
......
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