packer: better commenting

This commit is contained in:
Mitchell Hashimoto 2013-05-22 17:06:06 -07:00
parent e69e74b2dc
commit 73b7d94933
1 changed files with 2 additions and 0 deletions

View File

@ -162,6 +162,8 @@ func (t *Template) Build(name string, components *ComponentFinder) (b Build, err
panic("no builder function") panic("no builder function")
} }
// Panic if there are provisioners on the template but no provisioner
// component finder. This is always an internal error, so we panic.
if len(t.Provisioners) > 0 && components.Provisioner == nil { if len(t.Provisioners) > 0 && components.Provisioner == nil {
panic("no provisioner function") panic("no provisioner function")
} }