From 12d2900231a53f1f886736eb038e63e72822ef5d Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 10 Feb 2013 08:55:09 -0800 Subject: [PATCH] Show permission changes in debug mode --- Library/Homebrew/cleaner.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb index 2d9ce516b0..c3e060b1a9 100644 --- a/Library/Homebrew/cleaner.rb +++ b/Library/Homebrew/cleaner.rb @@ -52,13 +52,12 @@ class Cleaner else 0444 end - # Uncomment this block to show permission changes using brew install -v - # if ARGV.verbose? - # old_perms = path.stat.mode - # if perms != old_perms - # puts "Fixing #{path} permissions from #{old_perms.to_s(8)} to #{perms.to_s(8)}" - # end - # end + if ARGV.debug? + old_perms = path.stat.mode + if perms != old_perms + puts "Fixing #{path} permissions from #{old_perms.to_s(8)} to #{perms.to_s(8)}" + end + end path.chmod perms end