diff options
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index eca4fbb1e..64b61ec22 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -656,13 +656,6 @@ class FormulaAuditor if text =~ /def plist/ && text !~ /plist_options/ problem "Please set plist_options when using a formula-defined plist." end - - if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec\}/npm/bin] && formula.name !~ /^kibana(\d{2})?$/ - need_npm = "\#{Formula[\"node\"].opt_libexec\}/npm/bin" - problem <<-EOS.undent - Please add ENV.prepend_path \"PATH\", \"#{need_npm}"\ to def install - EOS - end end def audit_line(line, lineno) @@ -885,6 +878,10 @@ class FormulaAuditor problem "Use `assert_match` instead of `assert ...include?`" end + if line =~ /system "npm", "install"/ && line !~ /Language::Node/ + problem "Use Language::Node for npm install args" + end + if @strict if line =~ /system (["'][^"' ]*(?:\s[^"' ]*)+["'])/ bad_system = $1 |
