diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 4ca541a75c..cb7cb2510e 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -129,6 +129,10 @@ def audit_formula_text name, text problems << " * Use \"\#{ENV.cxx}\" instead of hard-coding \"#{$3}\"" end + if text =~ /system\s+['"](env|export)/ + problems << " * Use ENV instead of invoking '#{$1}' to modify the environment" + end + return problems end