Merge pull request #6738 from dunkmann00/audit_env

Fix Audit check for `env :std`
This commit is contained in:
Mike McQuaid 2019-11-13 17:58:56 -08:00 committed by GitHub
commit 1b926389ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -948,15 +948,13 @@ module Homebrew
problem "`Use :optional` or `:recommended` instead of `#{Regexp.last_match(0)}`"
end
return unless line =~ %r{share(\s*[/+]\s*)(['"])#{Regexp.escape(formula.name)}(?:\2|/)}
problem "Use pkgshare instead of (share#{Regexp.last_match(1)}\"#{formula.name}\")"
if line =~ %r{share(\s*[/+]\s*)(['"])#{Regexp.escape(formula.name)}(?:\2|/)}
problem "Use pkgshare instead of (share#{Regexp.last_match(1)}\"#{formula.name}\")"
end
return unless @core_tap
return unless line.include?("env :std")
problem "`env :std` in `core` formulae is deprecated"
problem "`env :std` in `core` formulae is deprecated" if line.include?("env :std")
end
def audit_reverse_migration