cask/artifact: support wildcards in uninstall quit/signal - #23559
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds wildcard (*) support for matching multiple running bundle IDs in Cask uninstall quit: and signal: directives, and introduces a RuboCop cop to prevent dangerously broad wildcard-only IDs.
Changes:
- Expand
quit:/signal:bundle IDs containing*to matching running bundle IDs at uninstall time. - Add
RuboCop::Cop::Cask::UninstallWildcardto flag wildcard-only IDs like"*"/"*.*"/"**"inuninstall/zapdirectives. - Add tests/fixtures and update the Cask cookbook documentation to describe the new wildcard behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/cask/artifact/abstract_uninstall.rb | Implements wildcard expansion for uninstall_quit and uninstall_signal via expand_bundle_id/running_bundle_ids. |
| Library/Homebrew/rubocops/cask/uninstall_wildcard.rb | New cop preventing unbounded wildcard-only IDs in uninstall/zap (quit/signal/launchctl). |
| Library/Homebrew/rubocops/rubocop-cask.rb | Registers the new uninstall_wildcard cop. |
| Library/Homebrew/test/cask/artifact/uninstall_spec.rb | Adds unit tests for wildcard matching behavior in uninstall_quit and uninstall_signal. |
| Library/Homebrew/test/rubocops/cask/uninstall_wildcard_spec.rb | Adds cop specs covering offenses and non-offenses. |
| Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-signal-wildcard.rb | New test fixture cask exercising uninstall signal wildcard usage. |
| docs/Cask-Cookbook.md | Documents wildcard semantics for quit: and signal: bundle IDs. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
MikeMcQuaid
reviewed
Aug 19, 2026
MikeMcQuaid
left a comment
Member
There was a problem hiding this comment.
Thanks, code looks good just need safety tightened up a bit.
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.
*) support to uninstall quit/signal paths*being used in these stanzasbrewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?I used
claude-codewith Opus 5 to implement the changes. I have reviewed the diff.