Fix qemu machine startHostNetworking always failing

Issue introduced in #14828

[NO NEW TESTS NEEDED]

Signed-off-by: Shane Smith <shane.smith@shopify.com>
This commit is contained in:
Shane Smith
2022-07-06 10:55:57 -04:00
parent 49df3cc5cb
commit a5898129cf

View File

@ -1217,7 +1217,10 @@ func (v *MachineVM) startHostNetworking() (string, apiForwardingState, error) {
fmt.Println(cmd)
}
_, err = os.StartProcess(cmd[0], cmd, attr)
return forwardSock, state, fmt.Errorf("unable to execute: %q: %w", cmd, err)
if err != nil {
return "", 0, fmt.Errorf("unable to execute: %q: %w", cmd, err)
}
return forwardSock, state, nil
}
func (v *MachineVM) setupAPIForwarding(cmd []string) ([]string, string, apiForwardingState) {