fix regression in return code checking in vsphere postprocessor. this was introduced in v1.6.1
This commit is contained in:
parent
e7a2615383
commit
6917866259
|
@ -202,7 +202,8 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packersdk.Ui, artifa
|
||||||
flattenedCmd := strings.Join(commandAndArgs, " ")
|
flattenedCmd := strings.Join(commandAndArgs, " ")
|
||||||
cmd := &packersdk.RemoteCmd{Command: flattenedCmd}
|
cmd := &packersdk.RemoteCmd{Command: flattenedCmd}
|
||||||
log.Printf("[INFO] (vsphere): starting ovftool command: %s", flattenedCmd)
|
log.Printf("[INFO] (vsphere): starting ovftool command: %s", flattenedCmd)
|
||||||
if err := cmd.RunWithUi(ctx, comm, ui); err != nil {
|
err = cmd.RunWithUi(ctx, comm, ui)
|
||||||
|
if err != nil || cmd.ExitStatus() != 0 {
|
||||||
return nil, false, false, fmt.Errorf(
|
return nil, false, false, fmt.Errorf(
|
||||||
"Error uploading virtual machine: Please see output above for more information.")
|
"Error uploading virtual machine: Please see output above for more information.")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue