audit: allow whitelisting of versioned Kibana.

This commit modifies the whitelisting of the Kibama formula from the
npm audit check to allow the versioned Kibana formulae to receive the
same whitelisting.

Closes Homebrew/homebrew#47500.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Jason Tedor 2015-12-29 10:50:19 -05:00 committed by Mike McQuaid
parent cfd4c3a181
commit 4b2eb86bbf

View File

@ -614,7 +614,7 @@ class FormulaAuditor
problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\"" problem "\"Formula.factory(name)\" is deprecated in favor of \"Formula[name]\""
end end
if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec\}/npm/bin] && formula.name != "kibana" if text =~ /system "npm", "install"/ && text !~ %r[opt_libexec\}/npm/bin] && formula.name !~ /^kibana(\d{2})?$/
need_npm = "\#{Formula[\"node\"].opt_libexec\}/npm/bin" need_npm = "\#{Formula[\"node\"].opt_libexec\}/npm/bin"
problem <<-EOS.undent problem <<-EOS.undent
Please add ENV.prepend_path \"PATH\", \"#{need_npm}"\ to def install Please add ENV.prepend_path \"PATH\", \"#{need_npm}"\ to def install