From 4531922ec3fccc8c2c8b117433bc9d090f9096ec Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 6 Jun 2013 17:09:51 -0700 Subject: [PATCH] packer: Return the provisioner prepare errors if they occurred --- packer/build.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packer/build.go b/packer/build.go index 97d6d5f8a..9e300fec3 100644 --- a/packer/build.go +++ b/packer/build.go @@ -50,9 +50,10 @@ func (b *coreBuild) Prepare(ui Ui) (err error) { } // Prepare the provisioners - // TODO: error handling for _, coreProv := range b.provisioners { - coreProv.provisioner.Prepare(coreProv.config) + if err = coreProv.provisioner.Prepare(coreProv.config); err != nil { + return + } } return