aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorAdam Vandenberg2011-01-22 09:32:16 -0800
committerAdam Vandenberg2011-03-12 11:55:07 -0800
commit24c7879b19be2a0dfc22bcd37ae32efeecde4eeb (patch)
treee33bc9b991c011d61838e0a0d1165db2cd81158f /Library/Homebrew/cmd
parentb55350e6a0ba20761a05f3a8a70216f80eea937f (diff)
downloadhomebrew-24c7879b19be2a0dfc22bcd37ae32efeecde4eeb.tar.bz2
audit - check formula permissions
Diffstat (limited to 'Library/Homebrew/cmd')
-rwxr-xr-xLibrary/Homebrew/cmd/audit.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 5580eaeeb..049260d47 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -212,6 +212,11 @@ module Homebrew extend self
problems += audit_formula_instance f
problems += audit_formula_urls f
+ perms = File.stat(f.path).mode
+ if perms.to_s(8) != "100644"
+ problems << " * permissions wrong; chmod 644 #{f.path}"
+ end
+
text = ""
File.open(f.path, "r") { |afile| text = afile.read }