aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-08-13 20:41:16 +0800
committerXu Cheng2015-08-14 15:52:57 +0800
commit541459791351a69b7b70047ee5e0c2c05797de92 (patch)
treeaf1815939c1162efc51b2a7dd98d523cc292e5b4 /Library
parent203cecb463a3f7d94a67251c44c5d28ab4341248 (diff)
downloadbrew-541459791351a69b7b70047ee5e0c2c05797de92.tar.bz2
cleanup: avoid duplicated logic
Closes Homebrew/homebrew#42900. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/cleanup.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index 9a211dcbc..8d5354673 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -31,12 +31,8 @@ module Homebrew
end
def cleanup_cellar
- Formula.racks.each do |rack|
- begin
- cleanup_formula Formulary.from_rack(rack)
- rescue FormulaUnavailableError, TapFormulaAmbiguityError
- # Don't complain about directories from DIY installs
- end
+ Formula.installed.each do |formula|
+ cleanup_formula formula
end
end