diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 7d70ad0532..bf478e2f5b 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -542,6 +542,14 @@ class FormulaAuditor method = $2 problem "Use the `#{method}` Ruby method instead of `system #{system}`" end + + if @strict + if line =~ /system (["'][^"' ]*\s[^"' ]*["'])/ + bad_system = $1 + good_system = bad_system.gsub(" ", "\", \"") + problem "Use `system #{good_system}` instead of `system #{bad_system}` " + end + end end def audit_conditional_dep(dep, condition, line)