From 3847db6026bc025bb7567a1b00d6428e276c297b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 8 Aug 2016 09:31:49 +0100 Subject: [PATCH] formula_installer: better handle missing conflict. Doesn't feel like a good reason to abort installation for users if the formula author has specified a conflict that doesn't exist. Instead, behave more like the `TapFormulaUnavailableError` but print a message telling people to report to the formula authors. Closes https://github.com/Homebrew/homebrew-versions/issues/1327 --- Library/Homebrew/formula_installer.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index eb98d80632..d8d1a8fbf8 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -251,10 +251,23 @@ class FormulaInstaller begin f = Formulary.factory(c.name) rescue TapFormulaUnavailableError - # If the formula name is in full-qualified name. Let's silently + # If the formula name is a fully-qualified name let's silently # ignore it as we don't care about things used in taps that aren't # currently tapped. false + rescue FormulaUnavailableError => e + # If the formula name doesn't exist any more then complain but don't + # stop installation from continuing. + opoo <<-EOS.undent + #{formula}: #{e.message} + 'conflicts_with \"#{c.name}\"' should be removed from #{formula.path.basename}. + EOS + if ARGV.homebrew_developer? + raise + else + $stderr.puts "Please report this to the #{formula.tap} tap!" + end + false else f.linked_keg.exist? && f.opt_prefix.exist? end