packer/template: Remove name from builder rawConfig

This prevents the builder from rejecting the name (which it doesn't
know about) when validating the config.
This commit is contained in:
Julian Phillips 2013-07-19 15:36:13 +01:00
parent dee1bc6c67
commit 40897fdfc2
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,10 @@ func ParseTemplate(data []byte) (t *Template, err error) {
continue
}
// Now that we have the name, remove it from the config - as the builder
// itself doesn't know about, and it will cause a validation error.
delete(v, "name")
raw.rawConfig = v
t.Builders[raw.Name] = raw