aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index e61967bb5..9a4801184 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -83,6 +83,7 @@ class FormulaInstaller
@show_summary_heading = true
else
audit_bin
+ audit_sbin
audit_lib
check_manpages
check_infopages
@@ -287,7 +288,7 @@ class FormulaInstaller
def audit_bin
return unless File.exist? f.bin
- non_exes = f.bin.children.select {|g| not File.executable? g}
+ non_exes = f.bin.children.select {|g| File.directory? g or not File.executable? g}
unless non_exes.empty?
opoo 'Non-executables were installed to "bin".'
@@ -298,6 +299,20 @@ class FormulaInstaller
end
end
+ def audit_sbin
+ return unless File.exist? f.sbin
+
+ non_exes = f.sbin.children.select {|g| File.directory? g or not File.executable? g}
+
+ unless non_exes.empty?
+ opoo 'Non-executables were installed to "sbin".'
+ puts "Installing non-executables to \"sbin\" is bad practice."
+ puts "The offending files are:"
+ puts non_exes
+ @show_summary_heading = true
+ end
+ end
+
def audit_lib
check_jars
check_non_libraries