diff options
| author | Mike McQuaid | 2018-02-05 09:31:17 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2018-02-05 10:59:11 +0000 |
| commit | 3a2e6b82fd008974c47b87a98c6c7bbf1dcdcea7 (patch) | |
| tree | 79b037e1d66772c089abc31ea4caaaf4876390b6 /Library/Homebrew/cmd/uninstall.rb | |
| parent | 62f85cfabbcff722afb406e48e56d5b10e6fc654 (diff) | |
| download | brew-3a2e6b82fd008974c47b87a98c6c7bbf1dcdcea7.tar.bz2 | |
Make pinning more robust
Don’t autoremove pins on uninstall or upgrade and note this in the
manpage.
Diffstat (limited to 'Library/Homebrew/cmd/uninstall.rb')
| -rw-r--r-- | Library/Homebrew/cmd/uninstall.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index f95b6c7bb..af0efaf62 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -46,6 +46,16 @@ module Homebrew rm_pin rack else kegs.each do |keg| + begin + f = Formulary.from_rack(rack) + if f.pinned? + onoe "#{f.full_name} is pinned. You must unpin it to uninstall." + next + end + rescue + nil + end + keg.lock do puts "Uninstalling #{keg}... (#{keg.abv})" keg.unlink |
