diff options
| author | Adam Vandenberg | 2013-06-23 12:48:45 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-06-23 12:54:28 -0700 |
| commit | 6a89d89bdfb361995234033e1fa840fbb268884e (patch) | |
| tree | 48795382494063a442ab3b3c02fc8ddf2ff4b4db /Library/Homebrew | |
| parent | b6d5f325823e384316cb100cef58a25bba5a9c93 (diff) | |
| download | homebrew-6a89d89bdfb361995234033e1fa840fbb268884e.tar.bz2 | |
Clean the cleaner
* Fix a comment; we pass in formulae not names
* Don't pass the formula to factory; this is just a pass-through
* Move require to top-level
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cleaner.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb index 8d89b7698..f58f7c8c1 100644 --- a/Library/Homebrew/cleaner.rb +++ b/Library/Homebrew/cleaner.rb @@ -6,9 +6,9 @@ # * sets permissions on executables class Cleaner - # Create a cleaner for the given formula name, and clean the keg + # Create a cleaner for the given formula and clean its keg def initialize f - @f = Formula.factory f + @f = f [f.bin, f.sbin, f.lib].select{ |d| d.exist? }.each{ |d| clean_dir d } if ENV['HOMEBREW_KEEP_INFO'] diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 9d6fa0848..2aec26bef 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -6,6 +6,7 @@ require 'keg' require 'tab' require 'bottles' require 'caveats' +require 'cleaner' class FormulaInstaller attr_reader :f @@ -409,7 +410,6 @@ class FormulaInstaller puts "in the formula." return end - require 'cleaner' Cleaner.new f rescue Exception => e opoo "The cleaning step did not complete successfully" |
