audit: system check fixed for multiple arguments

Closes Homebrew/homebrew#35459.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Baptiste Fontaine 2015-01-02 11:11:26 +01:00 committed by Mike McQuaid
parent 1e96c6fec4
commit 81986ee7a7

View File

@ -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}` "