audit: system check fixed for multiple arguments
Closes Homebrew/homebrew#35459. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
1e96c6fec4
commit
81986ee7a7
@ -552,7 +552,7 @@ class FormulaAuditor
|
||||
end
|
||||
|
||||
if @strict
|
||||
if line =~ /system (["'][^"' ]*\s[^"' ]*["'])/
|
||||
if line =~ /system (["'][^"' ]*(?:\s[^"' ]*)+["'])/
|
||||
bad_system = $1
|
||||
good_system = bad_system.gsub(" ", "\", \"")
|
||||
problem "Use `system #{good_system}` instead of `system #{bad_system}` "
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user