packer: Actually return if prepare of a build fails
This commit is contained in:
parent
520a2706ea
commit
7b0000cd4c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue