audit - check formula permissions

This commit is contained in:
Adam Vandenberg 2011-01-22 09:32:16 -08:00
parent 9ede899d5d
commit 4812dd1b89

View File

@ -212,6 +212,11 @@ module Homebrew extend self
problems += audit_formula_instance f problems += audit_formula_instance f
problems += audit_formula_urls 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 = "" text = ""
File.open(f.path, "r") { |afile| text = afile.read } File.open(f.path, "r") { |afile| text = afile.read }