diff options
| author | Jack Nagel | 2014-10-31 18:33:39 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-10-31 18:33:39 -0500 |
| commit | 86ba6234edb5b4bf87a21310f596d3239fc06c89 (patch) | |
| tree | 9aa3bca0fa23544be8589a452bd76c4b7a8e9bc4 /Library/Homebrew/cmd/install.rb | |
| parent | 3298d129a9eee1df86e375b6863ff81bb4b1a342 (diff) | |
| download | homebrew-86ba6234edb5b4bf87a21310f596d3239fc06c89.tar.bz2 | |
Remove FormulaAlreadyInstalledError
install is the only command that can trigger this warning, so it should
be handled before instantiating the installer.
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 16efadff4..00be1a2f5 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -25,6 +25,8 @@ module Homebrew end unless ARGV.force? begin + formulae = [] + ARGV.formulae.each do |f| # Building head-only without --HEAD is an error if not ARGV.build_head? and f.stable.nil? @@ -38,11 +40,19 @@ module Homebrew if ARGV.build_head? and f.head.nil? raise "No head is defined for #{f.name}" end + + if f.installed? + msg = "#{f.name}-#{f.installed_version} already installed" + msg << ", it's just not linked" unless f.linked_keg.symlink? or f.keg_only? + opoo msg + else + formulae << f + end end perform_preinstall_checks - ARGV.formulae.each { |f| install_formula(f) } + formulae.each { |f| install_formula(f) } rescue FormulaUnavailableError => e ofail e.message query = query_regexp(e.name) @@ -126,8 +136,6 @@ module Homebrew 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 FormulaAlreadyInstalledError => e - opoo e.message rescue CannotInstallFormulaError => e ofail e.message check_macports |
