aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 3f1463194..d517b95e0 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -198,6 +198,12 @@ class FormulaAuditor
end
end
+ def audit_java_home
+ if text =~ /JAVA_HOME/i && !formula.requirements.map(&:class).include?(JavaDependency)
+ problem "Use `depends_on :java` to set JAVA_HOME"
+ end
+ end
+
def audit_conflicts
formula.conflicts.each do |c|
begin
@@ -760,6 +766,7 @@ class FormulaAuditor
audit_specs
audit_urls
audit_deps
+ audit_java_home
audit_conflicts
audit_options
audit_patches