aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-03-27 23:51:52 +0800
committerXu Cheng2015-03-28 13:08:08 +0800
commit1539fda3e8d5107aba92191527e86cd85fb1df35 (patch)
tree2bc206be9011cf182e9edb75ce6a379e46f6d3b9
parentc46e2dc196f1b687bd983404295f8a6ca3273185 (diff)
downloadbrew-1539fda3e8d5107aba92191527e86cd85fb1df35.tar.bz2
Silently ignore FormulaUnavailableError in check_conflicts
If the formula name is in full-qualified name. Let's silently ignore it as we don't care about things used in taps that aren't currently tapped. Closes Homebrew/homebrew#38089. Signed-off-by: Xu Cheng <xucheng@me.com>
-rw-r--r--Library/Homebrew/formula_installer.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 1e6903be6..515239da7 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -192,8 +192,15 @@ class FormulaInstaller
return if ARGV.force?
conflicts = formula.conflicts.select do |c|
- f = Formulary.factory(c.name)
- f.linked_keg.exist? && f.opt_prefix.exist?
+ begin
+ f = Formulary.factory(c.name)
+ f.linked_keg.exist? && f.opt_prefix.exist?
+ rescue FormulaUnavailableError
+ raise unless c.name =~ HOMEBREW_TAP_FORMULA_REGEX
+ # If the formula name is in full-qualified name. Let's silently
+ # ignore it as we don't care about things used in taps that aren't
+ # currently tapped.
+ end
end
raise FormulaConflictError.new(formula, conflicts) unless conflicts.empty?