aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-02-10 08:55:09 -0800
committerAdam Vandenberg2013-02-10 08:55:09 -0800
commit12d2900231a53f1f886736eb038e63e72822ef5d (patch)
tree21108167793b3cca6f16013b60a1f88f6f03bc68 /Library
parentcf82e190900f4309ea0f81afcee8c3f8d9691711 (diff)
downloadbrew-12d2900231a53f1f886736eb038e63e72822ef5d.tar.bz2
Show permission changes in debug mode
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cleaner.rb13
1 files changed, 6 insertions, 7 deletions
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