From a1da909deaf13f94f83f5885693457898d6d49e1 Mon Sep 17 00:00:00 2001 From: ilovezfs <ilovezfs@icloud.com> Date: Sun, 5 Mar 2017 02:18:44 -0800 Subject: [PATCH] audit: whitelist node@* to use conflicts_with Add exceptions for node@* versioned formulae to use conflicts_with instead of keg_only :versioned_formula since they, and the main node formula, all currently overwrite npm during postinstall. --- Library/Homebrew/dev-cmd/audit.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 90dd03c1c5..3a4e395788 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -519,14 +519,6 @@ class FormulaAuditor end def audit_conflicts - if formula.conflicts.any? && formula.versioned_formula? - problem <<-EOS - Versioned formulae should not use `conflicts_with`. - Use `keg_only :versioned_formula` instead. - EOS - return - end - formula.conflicts.each do |c| begin Formulary.factory(c.name) @@ -539,6 +531,13 @@ class FormulaAuditor problem "Ambiguous conflicting formula #{c.name.inspect}." end end + + return unless formula.conflicts.any? && formula.versioned_formula? + return if formula.name.start_with? "node@" + problem <<-EOS + Versioned formulae should not use `conflicts_with`. + Use `keg_only :versioned_formula` instead. + EOS end def audit_options -- GitLab