diff options
| author | Alyssa Ross | 2016-09-15 16:01:59 +0100 |
|---|---|---|
| committer | Alyssa Ross | 2016-09-18 19:58:11 +0100 |
| commit | c874b4e4c2590cbb775583892f18ecdc96ca897c (patch) | |
| tree | a9b44351ea64adab93e9495ebeca91ce685f98b5 | |
| parent | 2a683f2569614850f79534a8547fd96cc52c7850 (diff) | |
| download | brew-c874b4e4c2590cbb775583892f18ecdc96ca897c.tar.bz2 | |
install: don't install alias if already installed
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 99cb75353..fdaf68d53 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -133,9 +133,14 @@ module Homebrew raise "No devel block is defined for #{f.full_name}" end - if f.installed? - msg = "#{f.full_name}-#{f.installed_version} already installed" - msg << ", it's just not linked" unless f.linked_keg.symlink? || f.keg_only? + current = f if f.installed? + current ||= f.old_installed_formulae.first + + if current + msg = "#{current.full_name}-#{current.installed_version} already installed" + unless current.linked_keg.symlink? || current.keg_only? + msg << ", it's just not linked" + end opoo msg elsif f.migration_needed? && !ARGV.force? # Check if the formula we try to install is the same as installed |
