Skip to content
Snippets Groups Projects
Commit f85863cb authored by Adam Vandenberg's avatar Adam Vandenberg
Browse files

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
parent 4ea815f7
No related branches found
No related tags found
No related merge requests found
......@@ -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']
......
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment