aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-03-27 23:51:52 +0800
committerXu Cheng2015-03-28 13:08:08 +0800
commit3cebc21bb6a493cd96a679173f8c4b1ce8827125 (patch)
tree1b1fb8ee4d9257f206fa61a29b8a013bf331c6ee
parentd9210739133b99c73867337333a206073b91d9bb (diff)
downloadhomebrew-3cebc21bb6a493cd96a679173f8c4b1ce8827125.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 #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?