aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorilovezfs2017-03-05 02:18:44 -0800
committerilovezfs2017-03-05 03:15:22 -0800
commita1da909deaf13f94f83f5885693457898d6d49e1 (patch)
treead0d59b849605e03060511743864ff71f5406f14 /Library/Homebrew/dev-cmd
parent8772b021a28074a70f84fc19d83af6d897c6fb51 (diff)
downloadbrew-a1da909deaf13f94f83f5885693457898d6d49e1.tar.bz2
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.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 90dd03c1c..3a4e39578 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