diff options
| author | Mike McQuaid | 2014-12-27 14:01:31 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-27 16:31:43 +0000 |
| commit | e56e2ca49219e6946cdf207da2988e8f51374d80 (patch) | |
| tree | 38c86c6c4a0d963ad2b4913b400517454caefdcd /Library/Homebrew/cmd | |
| parent | 0765d70400a5e33de00bb6cf08f9a26fd11e68f5 (diff) | |
| download | homebrew-e56e2ca49219e6946cdf207da2988e8f51374d80.tar.bz2 | |
audit (strict): check for use of spaces in system.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 7d70ad053..bf478e2f5 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) |
