diff options
| author | Jack Nagel | 2013-05-15 12:45:35 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-05-15 12:56:57 -0500 | 
| commit | c48ac0b9829c43a3b6a2721bbbbdc09f2ebf103a (patch) | |
| tree | cb164ba825d38e2ceffc862817e56206a20ae6f5 /Library/Homebrew/cmd/cleanup.rb | |
| parent | 0244040825f03e267a419386037430a4dee4ac7e (diff) | |
| download | brew-c48ac0b9829c43a3b6a2721bbbbdc09f2ebf103a.tar.bz2 | |
Methods that end in _formula should only accept a formula
Diffstat (limited to 'Library/Homebrew/cmd/cleanup.rb')
| -rw-r--r-- | Library/Homebrew/cmd/cleanup.rb | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 1bcf9e153..257b451f0 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -10,10 +10,9 @@ module Homebrew extend self        if HOMEBREW_CELLAR.directory?          HOMEBREW_CELLAR.children.each do |rack|            begin -            cleanup_formula rack.basename.to_s if rack.directory? +            cleanup_formula Formula.factory(rack.basename.to_s) if rack.directory?            rescue FormulaUnavailableError -            # Don't complain about Cellar folders that are from DIY installs -            # instead of core formulae. +            # Don't complain about directories from DIY installs            end          end        end @@ -31,8 +30,6 @@ module Homebrew extend self    end    def cleanup_formula f -    f = Formula.factory f -      if f.installed? and f.rack.directory?        f.rack.children.each do |keg|          if File.directory? keg and f.version > Keg.new(keg).version  | 
