aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/install.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-09-19 15:22:24 +0100
committerGitHub2016-09-19 15:22:24 +0100
commitc45119de75e70f32e3b3fdcccb210a88282a2f26 (patch)
tree9f3bd4abbc80df1ca391537da0c195281e9a94a7 /Library/Homebrew/cmd/install.rb
parent7ed7e3cd1a22a258ab8336b1f34b258ab8774e04 (diff)
parentd89a696d83cd325656e30a99cb4ba8342ffb39c9 (diff)
downloadbrew-c45119de75e70f32e3b3fdcccb210a88282a2f26.tar.bz2
Merge pull request #971 from penman/follow_alias
Make `brew upgrade` and `brew outdated` follow alias changes
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
-rw-r--r--Library/Homebrew/cmd/install.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index b2b3eb7c0..50439ccf9 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