From a5898129cfb88a0600f1f565fed1022ada25fdb0 Mon Sep 17 00:00:00 2001 From: Shane Smith Date: Wed, 6 Jul 2022 10:55:57 -0400 Subject: Fix qemu machine startHostNetworking always failing Issue introduced in #14828 [NO NEW TESTS NEEDED] Signed-off-by: Shane Smith --- pkg/machine/qemu/machine.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 879ed5109..ca7947e34 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -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) { -- cgit v1.2.3-54-g00ecf