aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.h.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index 55a416c09..6a284b292 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -250,6 +250,9 @@ def cleanup name
f = Formula.factory name
+ # we can't tell which one to keep in this circumstance
+ raise "The most recent version of #{name} is not installed" unless f.installed?
+
if f.prefix.parent.directory?
kids = f.prefix.parent.children
kids.each do |keg|