cmd/install: use migration_needed?
Closes #411. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
0d3b5f6849
commit
da06e813c2
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user