aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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."