Repository navigation
fix(cask): quit the running tray before uninstalling on upgrade - #7
Merged
Merged
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
quit: "com.smartmcpproxy.mcpproxy"to the cask'suninstallstanza.Why.
brew upgrade --cask mcpproxyleft two MCPProxy icons in the menu bar (smart-mcp-proxy/mcpproxy-go#2016). On upgrade Homebrew runs thepkgutil: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
quitbeforepkgutil(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
quitwith 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.rbreports no offenses locally. Not tested: a realbrew upgradewith this cask. The release job only rewritesversionandsha256, so this line persists across releases.