-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
cask uninstall: opt-in quit/signal on upgrade/reinstall #21130
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
cask uninstall: opt-in quit/signal on upgrade/reinstall #21130
Conversation
|
This is great! I'll give it a proper look through and test a bit later today or tomorrow. But thanks for looking at this @toobuntu |
59c7df6 to
e9686e1
Compare
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-quit-on-upgrade.rb
Outdated
Show resolved
Hide resolved
Allow casks to opt into running uninstall quit/signal during brew upgrade/reinstall (default is to skip them) via on_upgrade. Add fixtures, tests, and update docs. Implements Homebrew#17247
e9686e1 to
3536f2e
Compare
|
Rebased and updated: |
Teach UninstallMethodsOrder about on_upgrade metadata key, and add spec cases covering it. - Ignore metadata for ordering checks. - Flag on_upgrade when none of its symbols match uninstall directives, and autocorrect when other directives exist. - Warn without autocorrecting when on_upgrade symbols are invalid.
3536f2e to
45cdd3a
Compare
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @toobuntu, nice work!
brew lgtm(style, typechecking and tests) with your changes locally?Implements #17247 by letting casks opt into running uninstall quit/signal during
brew upgradeandbrew reinstall(default is to skip them) via anon_upgrademetadata key for uninstall stanzas of the formon_upgrade: :quit,on_upgrade: :signal, oron_upgrade: [:quit, :signal].Adds fixtures, tests, updates docs, and teaches
UninstallMethodsOrderto validate the metadata key and ignore it when checking uninstall method ordering. Default behavior remains unchanged unless a cask opts in.