aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Shablinsky2016-06-27 17:38:03 +0300
committerXu Cheng2016-06-29 21:04:28 +0800
commitda06e813c2b8925499484ff8be7772f6aa6ae9e3 (patch)
treef028355a1ff94ca42431059f0b9c9f2615a36634
parent0d3b5f6849e236272d6a1b83a1869845608b3d10 (diff)
downloadbrew-da06e813c2b8925499484ff8be7772f6aa6ae9e3.tar.bz2
cmd/install: use migration_needed?
Closes #411. Signed-off-by: Xu Cheng <xucheng@me.com>
-rw-r--r--Library/Homebrew/cmd/install.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 60141c4da..c07143ed2 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -132,8 +132,7 @@ module Homebrew
msg = "#{f.full_name}-#{f.installed_version} already installed"
msg << ", it's just not linked" unless f.linked_keg.symlink? || f.keg_only?
opoo msg
- elsif f.oldname && (dir = HOMEBREW_CELLAR/f.oldname).directory? && !dir.subdirs.empty? \
- && f.tap == Tab.for_keg(dir.subdirs.first).tap && !ARGV.force?
+ elsif f.migration_needed? && !ARGV.force?
# Check if the formula we try to install is the same as installed
# but not migrated one. If --force passed then install anyway.
opoo "#{f.oldname} already installed, it's just not migrated"