From 85846b633cc43b18857c943eadd446071f7c04cc Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Fri, 27 Aug 2021 09:54:54 -0500 Subject: change error comparison for exec.ErrNotFound it seeems exec.ErrNotFound does not work with simple equality checks and needs errors.Is() to work correctly. [NO TESTS NEEDED] Signed-off-by: Brent Baude --- pkg/machine/qemu/machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 284ea1d7f..646c84aba 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -608,7 +608,7 @@ func (v *MachineVM) startHostNetworking() error { // MacOS does not have /usr/libexec so we look in the executable // paths. binary, err := exec.LookPath(machine.ForwarderBinaryName) - if errors.Cause(err) == exec.ErrNotFound { + if errors.Is(err, exec.ErrNotFound) { // Nothing was found, so now check /usr/libexec, else error out binary = filepath.Join("/usr/libexec/podman/", machine.ForwarderBinaryName) if _, err := os.Stat(binary); err != nil { -- cgit v1.2.3-54-g00ecf