packer: better error message for bad provisioner only/except
This commit is contained in:
parent
15b48bb71e
commit
5c02bd3d26
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue