aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorAlyssa Ross2016-09-22 13:27:33 +0100
committerAlyssa Ross2016-10-25 22:34:34 +0100
commit6f0aabe70700654fdd19d1800fa61f4cdea25266 (patch)
tree16b58f43e35c8902175221dc41d19f8622b39b91 /Library/Homebrew/formula.rb
parent3f3fa4d0f7d5c28598fb7a2495d01efa35c7f7a2 (diff)
downloadbrew-6f0aabe70700654fdd19d1800fa61f4cdea25266.tar.bz2
uninstall: refuse when dependants still installed
Closes #934.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 69cab88c4..c2467b7bc 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1337,6 +1337,13 @@ class Formula
end
end
+ # Clear caches of .racks and .installed.
+ # @private
+ def self.clear_cache
+ @racks = nil
+ @installed = nil
+ end
+
# An array of all racks currently installed.
# @private
def self.racks