packer: Return the provisioner prepare errors if they occurred

This commit is contained in:
Mitchell Hashimoto 2013-06-06 17:09:51 -07:00
parent 0a6d8ed75a
commit 4531922ec3
1 changed files with 3 additions and 2 deletions

View File

@ -50,9 +50,10 @@ func (b *coreBuild) Prepare(ui Ui) (err error) {
} }
// Prepare the provisioners // Prepare the provisioners
// TODO: error handling
for _, coreProv := range b.provisioners { for _, coreProv := range b.provisioners {
coreProv.provisioner.Prepare(coreProv.config) if err = coreProv.provisioner.Prepare(coreProv.config); err != nil {
return
}
} }
return return