Skip to content

Commit

Permalink
failed build in case of error (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxtof authored Feb 10, 2023
1 parent 8175a38 commit d5f9b3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builder/nutanix/step_build_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func (s *stepBuildVM) Run(ctx context.Context, state multistep.StateBag) multist
log.Println("temporary iso found, " + cdFilesPath)
cdfilesImage, err := d.UploadImage(cdFilesPath, "PATH", "ISO_IMAGE", config.VmConfig)
if err != nil {
ui.Error("Error uploading temporary image:")
ui.Error(err.Error())
ui.Error("Error uploading temporary image:" + err.Error())
state.Put("error", err)
return multistep.ActionHalt
}
ui.Say("Temporary ISO uploaded")
Expand All @@ -46,6 +46,7 @@ func (s *stepBuildVM) Run(ctx context.Context, state multistep.StateBag) multist
vmRequest, err := d.CreateRequest(config.VmConfig)
if err != nil {
ui.Error("Error creating Request: " + err.Error())
state.Put("error", err)
return multistep.ActionHalt
}
vmInstance, err := d.Create(vmRequest)
Expand Down

0 comments on commit d5f9b3f

Please sign in to comment.