From e7ca13e299dc2f3e9e1c2502ce6cbb425efe86e7 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 10 Feb 2013 08:55:09 -0800 Subject: Show permission changes in debug mode --- Library/Homebrew/cleaner.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cleaner.rb b/Library/Homebrew/cleaner.rb index 2d9ce516b..c3e060b1a 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 -- cgit v1.2.3