aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-09-18 16:25:44 -0400
committerMax Howell2012-09-18 16:27:34 -0400
commit12d17155cf9c3c66bf707caa6e4f55ef82a2ca97 (patch)
treea9928dfb40d864bf8e7003dfe1ce4cff6200733f /Library
parent55dc5466fb787c7b030d5b3e4e21f6701ec60f57 (diff)
downloadbrew-12d17155cf9c3c66bf707caa6e4f55ef82a2ca97.tar.bz2
If we delete stuff in the clean step, make fuss
/cc @jwheare
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cleaner.rb14
-rw-r--r--Library/Homebrew/formula_installer.rb1
2 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb
index d40cdaf97..9907745d5 100644
--- a/Library/Homebrew/cleaner.rb
+++ b/Library/Homebrew/cleaner.rb
@@ -52,6 +52,8 @@ class Cleaner
# Clean a single folder (non-recursively)
def clean_dir d
d.find do |path|
+ path.extend(NoiseyPathname) if ARGV.verbose?
+
if path.directory?
# Stop cleaning this subtree if protected
Find.prune if @f.skip_clean? path
@@ -72,3 +74,15 @@ class Cleaner
end
end
+
+
+class Pathname
+ alias_method :orig_unlink, :unlink
+end
+
+module NoiseyPathname
+ def unlink
+ puts "rm: #{self}"
+ orig_unlink
+ end
+end
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index d4ae876bd..d9cff505c 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -303,6 +303,7 @@ class FormulaInstaller
end
def clean
+ ohai "Cleaning" if ARGV.verbose?
if f.class.skip_clean_all?
opoo "skip_clean :all is deprecated"
puts "Skip clean was commonly used to prevent brew from stripping binaries."