-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cask/reinstall: Support
--zap
for entirely purging cask files
- The `brew uninstall` command has `--zap`, so let's make `brew reinstall` have parity here for a better user experience. (Requested in issue 12983.) - It feels weird that to get my new reinstall test to pass I had to add `--zap` to `cask/cmd/install.rb`, not `cask/cmd/reinstall.rb` to get the tests to pass. But the `brew reinstall --cask caffeine --zap` command worked fine all the time. The CLI argument parser from the test run was complaining about not knowing what `zap` was. As a result, `--zap` now shows up as a switch in `brew install --help` which I'm not 100% convinced is the desired UX. But I've edited the description accordingly to specify that it will only work on `reinstall` operations (and `--zap` on `install` is a no-op). ``` issyl0 at pictor in /opt/homebrew on reinstall-cask-zap ❯ brew reinstall --cask caffeine --zap ==> Downloading https://github.com/IntelliScape/caffeine/releases/download/1.1.3/Caffeine.dmg Already downloaded: /Users/issyl0/Library/Caches/Homebrew/downloads/3d6ccfdd3b8d0ab37d1c2468d6e69078c2d31d3b12bf51947c4db21e5f376af2--Caffeine.dmg ==> Implied `brew uninstall --cask caffeine` ==> Backing App 'Caffeine.app' up to '/opt/homebrew/Caskroom/caffeine/1.1.3/Caffeine.app' ==> Removing App '/Applications/Caffeine.app' ==> Dispatching zap stanza ==> Trashing files: ~/Library/Application Support/com.intelliscapesolutions.caffeine ~/Library/Preferences/com.intelliscapesolutions.caffeine.plist ~/Library/Caches/com.intelliscapesolutions.caffeine ~/Library/HTTPStoages/com.intelliscapesolutions.caffeine.binarycookies ==> Removing all staged versions of Cask 'caffeine' ==> Installing Cask caffeine ==> Moving App 'Caffeine.app' to '/Applications/Caffeine.app' 🍺 caffeine was successfully installed! ```
- Loading branch information
Showing
7 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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