diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index c8512925b1..e2ac9c44d2 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -903,7 +903,7 @@ class FormulaAuditor end if @strict - if line =~ /system (["'][^"' ]*(?:\s[^"' ]*)+["'])/ + if line =~ /system ((["'])[^"' ]*(?:\s[^"' ]*)+\2)/ bad_system = $1 unless %w[| < > & ; *].any? { |c| bad_system.include? c } good_system = bad_system.gsub(" ", "\", \"")