diff options
| -rw-r--r-- | Library/Homebrew/cmd/cleanup.rb | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 8e57b7341..6a83d3e78 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -14,13 +14,13 @@ module Homebrew extend self    end    def cleanup_all -    if HOMEBREW_CELLAR.directory? -      HOMEBREW_CELLAR.children.each do |rack| -        begin -          cleanup_formula Formula.factory(rack.basename.to_s) if rack.directory? -        rescue FormulaUnavailableError -          # Don't complain about directories from DIY installs -        end +    return unless HOMEBREW_CELLAR.directory? + +    HOMEBREW_CELLAR.children.each do |rack| +      begin +        cleanup_formula Formula.factory(rack.basename.to_s) if rack.directory? +      rescue FormulaUnavailableError +        # Don't complain about directories from DIY installs        end      end      clean_cache | 
