Merge pull request #17916 from Luap99/mac-helper-error

macos pkginstaller: fix regression which caused the installer to fail
This commit is contained in:
OpenShift Merge Robot
2023-03-24 13:39:41 -04:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@ -93,7 +93,8 @@ func install(cmd *cobra.Command, args []string) error {
fileName := filepath.Join("/Library", "LaunchDaemons", labelName) fileName := filepath.Join("/Library", "LaunchDaemons", labelName)
if _, err := os.Stat(fileName); err == nil || !os.IsNotExist(err) { if _, err := os.Stat(fileName); err == nil || !os.IsNotExist(err) {
return errors.New("helper is already installed, uninstall first") fmt.Fprintln(os.Stderr, "helper is already installed, skipping the install, uninstall first if you want to reinstall")
return nil
} }
prog, err := installExecutable(userName) prog, err := installExecutable(userName)

View File

@ -7,4 +7,5 @@ echo "/opt/podman/bin" > /etc/paths.d/podman-pkg
ln -s /opt/podman/bin/podman-mac-helper /opt/podman/qemu/bin/podman-mac-helper ln -s /opt/podman/bin/podman-mac-helper /opt/podman/qemu/bin/podman-mac-helper
ln -s /opt/podman/bin/gvproxy /opt/podman/qemu/bin/gvproxy ln -s /opt/podman/bin/gvproxy /opt/podman/qemu/bin/gvproxy
/opt/podman/bin/podman-mac-helper install # make sure to ignore errors, this is not a hard requirement to use podman
/opt/podman/bin/podman-mac-helper install || :