Skip to content

Commit

Permalink
Merge pull request #17916 from Luap99/mac-helper-error
Browse files Browse the repository at this point in the history
macos pkginstaller: fix regression which caused the installer to fail
  • Loading branch information
openshift-merge-robot authored Mar 24, 2023
2 parents f9beb0d + 64ba826 commit 67c98ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/podman-mac-helper/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func install(cmd *cobra.Command, args []string) error {
fileName := filepath.Join("/Library", "LaunchDaemons", labelName)

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)
Expand Down
3 changes: 2 additions & 1 deletion contrib/pkginstaller/scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -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/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 || :

0 comments on commit 67c98ec

Please sign in to comment.