Merge pull request #3867 from MikeMcQuaid/migrator-messaging-tweaks
migrator: tweak more messaging.
This commit is contained in:
commit
3184d087b9
@ -183,7 +183,7 @@ class Migrator
|
||||
end
|
||||
|
||||
def migrate
|
||||
oh1 "Migrating #{Formatter.identifier(oldname)} to #{Formatter.identifier(newname)}"
|
||||
oh1 "Processing #{Formatter.identifier(oldname)} formula rename to #{Formatter.identifier(newname)}"
|
||||
lock
|
||||
unlink_oldname
|
||||
unlink_newname if new_cellar.exist?
|
||||
@ -195,7 +195,10 @@ class Migrator
|
||||
update_tabs
|
||||
return unless formula.outdated?
|
||||
opoo <<~EOS
|
||||
#{Formatter.identifier(newname)} is outdated! Please run as soon as possible:
|
||||
#{Formatter.identifier(newname)} is outdated!
|
||||
To avoid broken installations, as soon as possible please run:
|
||||
brew upgrade
|
||||
Or, if you're OK with a less reliable fix:
|
||||
brew upgrade #{newname}
|
||||
EOS
|
||||
rescue Interrupt
|
||||
@ -231,7 +234,7 @@ class Migrator
|
||||
end
|
||||
end
|
||||
|
||||
oh1 "Moving #{Formatter.identifier(oldname)} children"
|
||||
oh1 "Moving #{Formatter.identifier(oldname)} versions to #{new_cellar}"
|
||||
if new_cellar.exist?
|
||||
FileUtils.mv(old_cellar.children, new_cellar)
|
||||
else
|
||||
@ -266,7 +269,7 @@ class Migrator
|
||||
end
|
||||
|
||||
def unlink_newname
|
||||
oh1 "Unlinking #{Formatter.identifier(newname)}"
|
||||
oh1 "Temporarily unlinking #{Formatter.identifier(newname)}"
|
||||
new_cellar.subdirs.each do |d|
|
||||
keg = Keg.new(d)
|
||||
keg.unlink
|
||||
@ -274,7 +277,7 @@ class Migrator
|
||||
end
|
||||
|
||||
def link_newname
|
||||
oh1 "Linking #{Formatter.identifier(newname)}"
|
||||
oh1 "Relinking #{Formatter.identifier(newname)}"
|
||||
new_keg = Keg.new(new_linked_keg_record)
|
||||
|
||||
# If old_keg wasn't linked then we just optlink a keg.
|
||||
|
||||
@ -29,7 +29,7 @@ describe "brew migrate", :integration_test do
|
||||
install_and_rename_coretap_formula "testball1", "testball2"
|
||||
|
||||
expect { brew "migrate", "testball1" }
|
||||
.to output(/Migrating testball1 to testball2/).to_stdout
|
||||
.to output(/Processing testball1 formula rename to testball2/).to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
.and be_a_success
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user