diff options
author | Brent Baude <bbaude@redhat.com> | 2021-08-27 09:54:54 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2021-08-27 10:06:51 -0500 |
commit | 85846b633cc43b18857c943eadd446071f7c04cc (patch) | |
tree | 1dc3a36e877c5c8334f473180b7c4c6ee962550c | |
parent | d09259a1a754ab08c74b13272882a89b5c736e88 (diff) | |
download | podman-85846b633cc43b18857c943eadd446071f7c04cc.tar.gz podman-85846b633cc43b18857c943eadd446071f7c04cc.tar.bz2 podman-85846b633cc43b18857c943eadd446071f7c04cc.zip |
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 <bbaude@redhat.com>
-rw-r--r-- | pkg/machine/qemu/machine.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |