Commit 7b0000cd authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: Actually return if prepare of a build fails

parent 520a2706
......@@ -47,6 +47,7 @@ func (b *coreBuild) Prepare(ui Ui) (err error) {
err = b.builder.Prepare(b.builderConfig)
if err != nil {
log.Printf("Build '%s' prepare failure: %s\n", b.name, err)
return
}
// Prepare the provisioners
......
......@@ -41,8 +41,8 @@ func (b *build) Prepare(ui packer.Ui) (err error) {
RegisterUi(server, ui)
args := &BuildPrepareArgs{serveSingleConn(server)}
if err := b.client.Call("Build.Prepare", args, &err); err != nil {
panic(err)
if cerr := b.client.Call("Build.Prepare", args, &err); cerr != nil {
panic(cerr)
}
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment