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

macos pkginstaller: fix regression which caused the installer to fail #17916

Merged
merged 2 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
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
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 || :