aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAdam Vandenberg2010-10-17 17:40:54 -0700
committerAdam Vandenberg2010-10-17 17:40:54 -0700
commitcdf35d1d8df43c5d36e502340820175bb0509ada (patch)
tree03b1eb3fa86942cb267678ec79db4c6578f7d650 /bin
parent560408d01b5b2bba26bc0926802246687e48911b (diff)
downloadbrew-cdf35d1d8df43c5d36e502340820175bb0509ada.tar.bz2
remove - show message when multiple versions exist
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew13
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/brew b/bin/brew
index bb12c932b..3e2dbf9a7 100755
--- a/bin/brew
+++ b/bin/brew
@@ -188,10 +188,15 @@ begin
ARGV.kegs.each {|keg| puts "#{keg.unlink} links removed for #{keg}"}
when 'rm', 'uninstall', 'remove'
- ARGV.kegs.each do |keg|
- puts "Uninstalling #{keg}..."
- keg.unlink
- keg.uninstall
+ begin
+ ARGV.kegs.each do |keg|
+ puts "Uninstalling #{keg}..."
+ keg.unlink
+ keg.uninstall
+ end
+ rescue MultipleVersionsInstalledError => e
+ onoe e
+ puts "Use `brew remove --force #{e.name}` to remove all versions."
end
when 'prune'