Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix gvproxy path search for macos #11234

Merged
merged 1 commit into from
Aug 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions pkg/machine/qemu/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,15 @@ func CheckActiveVM() (bool, string, error) {
// startHostNetworking runs a binary on the host system that allows users
// to setup port forwarding to the podman virtual machine
func (v *MachineVM) startHostNetworking() error {
// TODO we may wish to configure the directory in containers common
binary := filepath.Join("/usr/libexec/podman/", machine.ForwarderBinaryName)
if _, err := os.Stat(binary); err != nil {
return err
// 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 {
// 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 {
return err
}
}

// Listen on all at port 7777 for setting up and tearing
Expand Down