audit: find env/export as a full word, not as a prefix

Closes Homebrew/homebrew#27219.
This commit is contained in:
Adam Vandenberg 2014-03-05 07:53:19 -08:00
parent 21b2fdface
commit d55dc8d01e

View File

@ -424,7 +424,7 @@ class FormulaAuditor
problem "Use \"\#{ENV.cxx}\" instead of hard-coding \"#{$3}\""
end
if line =~ /system\s+['"](env|export)/
if line =~ /system\s+['"](env|export)\s+/
problem "Use ENV instead of invoking '#{$1}' to modify the environment"
end