Only run migration when updating from older version.
This commit is contained in:
parent
4065c1742d
commit
8158f045c4
@ -62,6 +62,11 @@ module Homebrew
|
|||||||
updated = true
|
updated = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
initial_version = Version.new(system_command!("git",
|
||||||
|
args: ["describe", "--tags", "--abbrev=0", initial_revision],
|
||||||
|
chdir: HOMEBREW_REPOSITORY,
|
||||||
|
print_stderr: false).stdout)
|
||||||
|
|
||||||
updated_taps = []
|
updated_taps = []
|
||||||
Tap.each do |tap|
|
Tap.each do |tap|
|
||||||
next unless tap.git?
|
next unless tap.git?
|
||||||
@ -85,7 +90,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
migrate_legacy_cache_if_necessary
|
migrate_legacy_cache_if_necessary
|
||||||
migrate_cache_entries_to_double_dashes
|
migrate_cache_entries_to_double_dashes(initial_version)
|
||||||
migrate_legacy_keg_symlinks_if_necessary
|
migrate_legacy_keg_symlinks_if_necessary
|
||||||
|
|
||||||
if !updated
|
if !updated
|
||||||
@ -184,7 +189,9 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def migrate_cache_entries_to_double_dashes
|
def migrate_cache_entries_to_double_dashes(initial_version)
|
||||||
|
return if initial_version > "1.7.1"
|
||||||
|
|
||||||
HOMEBREW_CACHE.children.each do |child|
|
HOMEBREW_CACHE.children.each do |child|
|
||||||
next unless child.file?
|
next unless child.file?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user