Skip to content

fix(cask): quit the running tray before uninstalling on upgrade - #7

Merged
Dumbris merged 1 commit into
mainfrom
fix/cask-quit-on-upgrade
Nov 24, 2026
Merged

Dumbris merged 1 commit into
mainfrom
fix/cask-quit-on-upgrade

Conversation

@Dumbris

@Dumbris Dumbris commented Nov 24, 2026

Copy link
Copy Markdown
Member

Adds quit: "com.smartmcpproxy.mcpproxy" to the cask's uninstall stanza.

Why. brew upgrade --cask mcpproxy left two MCPProxy icons in the menu bar (smart-mcp-proxy/mcpproxy-go#2016). On upgrade Homebrew runs the pkgutil: step, which deletes the app bundle while the old tray is still running from it; the new pkg then starts a second tray.

What changes. Homebrew runs quit before pkgutil (its fixed directive order), and runs it on upgrade and reinstall as well as on uninstall. The tray now exits before its files are removed. Homebrew reopens an app it quit during an upgrade; the pkg's postinstall already launches the tray, so that reopen only activates it.

Limits. Homebrew skips quit with a warning when there is no GUI session, and gives up after 10 seconds if the app does not exit (for example when the terminal lacks Automation permission). The pkg's own preinstall quit step in smart-mcp-proxy/mcpproxy-go#2024 covers those cases, so the two changes are independent.

Checked. brew style Casks/mcpproxy.rb reports no offenses locally. Not tested: a real brew upgrade with this cask. The release job only rewrites version and sha256, so this line persists across releases.

`brew upgrade --cask mcpproxy` left two MCPProxy icons in the menu bar
(smart-mcp-proxy/mcpproxy-go#2016). The `pkgutil:` step deleted the app
bundle while the old tray was still running from it, and the new pkg
then launched a second tray.

`quit:` runs before `pkgutil:` and also on upgrade, so the tray now
exits before its files are removed. Homebrew skips it with a warning
when there is no GUI session or the app does not quit within 10 seconds;
the pkg's own preinstall (mcpproxy-go#2024) covers that case.
@Dumbris
Dumbris merged commit 172d925 into main Nov 24, 2026
1 check passed
@Dumbris
Dumbris deleted the fix/cask-quit-on-upgrade branch November 24, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant