aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/audit.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index dd41d9284..9eac644ad 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -714,8 +714,10 @@ class FormulaAuditor
if @strict
if line =~ /system (["'][^"' ]*(?:\s[^"' ]*)+["'])/
bad_system = $1
- good_system = bad_system.gsub(" ", "\", \"")
- problem "Use `system #{good_system}` instead of `system #{bad_system}` "
+ unless %w[| < > & ;].any? { |c| bad_system.include? c }
+ good_system = bad_system.gsub(" ", "\", \"")
+ problem "Use `system #{good_system}` instead of `system #{bad_system}` "
+ end
end
if line =~ /(require ["']formula["'])/