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) { ...@@ -47,6 +47,7 @@ func (b *coreBuild) Prepare(ui Ui) (err error) {
err = b.builder.Prepare(b.builderConfig) err = b.builder.Prepare(b.builderConfig)
if err != nil { if err != nil {
log.Printf("Build '%s' prepare failure: %s\n", b.name, err) log.Printf("Build '%s' prepare failure: %s\n", b.name, err)
return
} }
// Prepare the provisioners // Prepare the provisioners
......
...@@ -41,8 +41,8 @@ func (b *build) Prepare(ui packer.Ui) (err error) { ...@@ -41,8 +41,8 @@ func (b *build) Prepare(ui packer.Ui) (err error) {
RegisterUi(server, ui) RegisterUi(server, ui)
args := &BuildPrepareArgs{serveSingleConn(server)} args := &BuildPrepareArgs{serveSingleConn(server)}
if err := b.client.Call("Build.Prepare", args, &err); err != nil { if cerr := b.client.Call("Build.Prepare", args, &err); cerr != nil {
panic(err) panic(cerr)
} }
return 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