diff options
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 20 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/upgrade.rb | 3 |
2 files changed, 15 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 90acb0774..ef01d0452 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -78,16 +78,20 @@ module Homebrew extend self unless formulae.empty? perform_preinstall_checks formulae.each do |f| - begin - fi = FormulaInstaller.new(f) - fi.install - fi.caveats - fi.finish - rescue CannotInstallFormulaError => e - ofail e.message - end + install_formula(f) end end end + def install_formula f + fi = FormulaInstaller.new(f) + fi.install + fi.caveats + fi.finish + rescue FormulaInstallationAlreadyAttemptedError + # We already attempted to install f as part of the dependency tree of + # another formula. In that case, don't generate an error, just move on. + rescue CannotInstallFormulaError => e + ofail e.message + end end diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 06dfb8732..c3a924ec5 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -73,6 +73,9 @@ module Homebrew extend self installer.install installer.caveats installer.finish + rescue FormulaInstallationAlreadyAttemptedError + # We already attempted to upgrade f as part of the dependency tree of + # another formula. In that case, don't generate an error, just move on. rescue CannotInstallFormulaError => e ofail e rescue BuildError => e |
