aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMike McQuaid2018-01-09 18:12:15 +0000
committerGitHub2018-01-09 18:12:15 +0000
commit311aa724ddb1d738476af6573153c28d6f606054 (patch)
tree38f6efef9619cc2d97a55b9960514b9935c3ecba /Library/Homebrew/dev-cmd
parent5fe2ca2a833f94df2adea4947fb89662c17dd53f (diff)
parent50a84f2535db0089e14a5062395ef91613155f13 (diff)
downloadbrew-311aa724ddb1d738476af6573153c28d6f606054.tar.bz2
Merge pull request #3650 from MikeMcQuaid/audit-allow-std
audit: allow env :std in custom taps.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 16eb03dbc..9d0ed3c59 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -304,7 +304,7 @@ class FormulaAuditor
def audit_formula_name
return unless @strict
# skip for non-official taps
- return if formula.tap.nil? || !formula.tap.official?
+ return unless formula.tap&.official?
name = formula.name
@@ -718,7 +718,13 @@ class FormulaAuditor
return unless @strict
- problem "`#{Regexp.last_match(1)}` in formulae is deprecated" if line =~ /(env :(std|userpaths))/
+ if formula.tap&.official? && line.include?("env :std")
+ problem "`env :std` in official tap formulae is deprecated"
+ end
+
+ if line.include?("env :userpaths")
+ problem "`env :userpaths` in formulae is deprecated"
+ end
if line =~ /system ((["'])[^"' ]*(?:\s[^"' ]*)+\2)/
bad_system = Regexp.last_match(1)