diff options
| author | Mike McQuaid | 2014-12-27 14:01:31 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-27 16:31:43 +0000 |
| commit | c82e48b90488c413681b301cac889d78a6e2e1cf (patch) | |
| tree | af1b59b5ada415d8e48508907c04eccdb1b7ecdb /Library/Homebrew/cmd | |
| parent | 3e3a4cad500ccc347209a7df40ad5e73dc6f88f2 (diff) | |
| download | brew-c82e48b90488c413681b301cac889d78a6e2e1cf.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) |
