If we delete stuff in the clean step, make fuss

/cc @jwheare
This commit is contained in:
Max Howell 2012-09-18 16:25:44 -04:00
parent 55dc5466fb
commit 12d17155cf
2 changed files with 15 additions and 0 deletions

View File

@ -52,6 +52,8 @@ class Cleaner
# Clean a single folder (non-recursively) # Clean a single folder (non-recursively)
def clean_dir d def clean_dir d
d.find do |path| d.find do |path|
path.extend(NoiseyPathname) if ARGV.verbose?
if path.directory? if path.directory?
# Stop cleaning this subtree if protected # Stop cleaning this subtree if protected
Find.prune if @f.skip_clean? path Find.prune if @f.skip_clean? path
@ -72,3 +74,15 @@ class Cleaner
end end
end end
class Pathname
alias_method :orig_unlink, :unlink
end
module NoiseyPathname
def unlink
puts "rm: #{self}"
orig_unlink
end
end

View File

@ -303,6 +303,7 @@ class FormulaInstaller
end end
def clean def clean
ohai "Cleaning" if ARGV.verbose?
if f.class.skip_clean_all? if f.class.skip_clean_all?
opoo "skip_clean :all is deprecated" opoo "skip_clean :all is deprecated"
puts "Skip clean was commonly used to prevent brew from stripping binaries." puts "Skip clean was commonly used to prevent brew from stripping binaries."