audit: don't complain ENV.fortran if depends_on :fortran
Fix the audit problem in Homebrew/homebrew#40000. Closes Homebrew/homebrew#40012. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
df246cba44
commit
cc0c9cf619
@ -597,7 +597,7 @@ class FormulaAuditor
|
||||
problem "Define method #{$1.inspect} in the class body, not at the top-level"
|
||||
end
|
||||
|
||||
if line =~ /ENV.fortran/
|
||||
if line =~ /ENV.fortran/ && !formula.requirements.map(&:class).include?(FortranDependency)
|
||||
problem "Use `depends_on :fortran` instead of `ENV.fortran`"
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user