use directory? to check rack existence
This commit is contained in:
parent
a7df9c53eb
commit
1ae44d4429
@ -77,7 +77,7 @@ module Homebrew
|
|||||||
msg = "#{f.full_name}-#{f.installed_version} already installed"
|
msg = "#{f.full_name}-#{f.installed_version} already installed"
|
||||||
msg << ", it's just not linked" unless f.linked_keg.symlink? || f.keg_only?
|
msg << ", it's just not linked" unless f.linked_keg.symlink? || f.keg_only?
|
||||||
opoo msg
|
opoo msg
|
||||||
elsif f.oldname && (dir = HOMEBREW_CELLAR/f.oldname).exist? && !dir.subdirs.empty? \
|
elsif f.oldname && (dir = HOMEBREW_CELLAR/f.oldname).directory? && !dir.subdirs.empty? \
|
||||||
&& f.tap == Tab.for_keg(dir.subdirs.first).tap && !ARGV.force?
|
&& f.tap == Tab.for_keg(dir.subdirs.first).tap && !ARGV.force?
|
||||||
# Check if the formula we try to install is the same as installed
|
# Check if the formula we try to install is the same as installed
|
||||||
# but not migrated one. If --force passed then install anyway.
|
# but not migrated one. If --force passed then install anyway.
|
||||||
|
|||||||
@ -18,10 +18,9 @@ module Homebrew
|
|||||||
all_versions = []
|
all_versions = []
|
||||||
older_or_same_tap_versions = []
|
older_or_same_tap_versions = []
|
||||||
|
|
||||||
if f.oldname && !f.rack.exist? && (dir = HOMEBREW_CELLAR/f.oldname).exist?
|
if f.oldname && !f.rack.exist? && (dir = HOMEBREW_CELLAR/f.oldname).directory? &&
|
||||||
if f.tap == Tab.for_keg(dir.subdirs.first).tap
|
!dir.subdirs.empty? && f.tap == Tab.for_keg(dir.subdirs.first).tap
|
||||||
raise Migrator::MigrationNeededError.new(f)
|
raise Migrator::MigrationNeededError.new(f)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
f.rack.subdirs.each do |keg_dir|
|
f.rack.subdirs.each do |keg_dir|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user