packer: better error message for bad provisioner only/except
This commit is contained in:
parent
e6e4face8a
commit
1d8ecd4444
|
@ -273,7 +273,10 @@ func ParseTemplate(data []byte) (t *Template, err error) {
|
||||||
|
|
||||||
// Verify that the only settings are good
|
// Verify that the only settings are good
|
||||||
if errs := raw.TemplateOnlyExcept.Validate(t.Builders); len(errs) > 0 {
|
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
|
raw.RawConfig = v
|
||||||
|
|
Loading…
Reference in New Issue