cleanup: use early return rather than method-spanning conditional

This commit is contained in:
Jack Nagel 2013-05-15 12:45:36 -05:00
parent 8cd331718e
commit 5515d359d5

View File

@ -14,7 +14,8 @@ module Homebrew extend self
end
def cleanup_all
if HOMEBREW_CELLAR.directory?
return unless HOMEBREW_CELLAR.directory?
HOMEBREW_CELLAR.children.each do |rack|
begin
cleanup_formula Formula.factory(rack.basename.to_s) if rack.directory?
@ -22,7 +23,6 @@ module Homebrew extend self
# Don't complain about directories from DIY installs
end
end
end
clean_cache
# seems like a good time to do some additional cleanup
unless ARGV.dry_run?