Merge pull request #3864 from MikeMcQuaid/migrator-upgrade

migrator: recommend upgrade.
This commit is contained in:
ilovezfs 2018-03-02 21:18:22 -08:00 committed by GitHub
commit 08f7e8c588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,6 +193,11 @@ class Migrator
link_oldname_opt link_oldname_opt
link_newname unless old_linked_keg.nil? link_newname unless old_linked_keg.nil?
update_tabs update_tabs
return unless formula.outdated?
opoo <<~EOS
#{Formatter.identifier(newname)} is outdated! Please run as soon as possible:
brew upgrade #{newname}
EOS
rescue Interrupt rescue Interrupt
ignore_interrupts { backup_oldname } ignore_interrupts { backup_oldname }
rescue Exception => e # rubocop:disable Lint/RescueException rescue Exception => e # rubocop:disable Lint/RescueException