migrator: recommend brew upgrade.

You’re in a weird middle state if you run `brew update` but haven’t
upgraded a migrated formula.
This commit is contained in:
Mike McQuaid 2018-03-02 21:23:04 +00:00
parent 6302da37f6
commit 2f776ed523

View File

@ -193,6 +193,11 @@ class Migrator
link_oldname_opt
link_newname unless old_linked_keg.nil?
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
ignore_interrupts { backup_oldname }
rescue Exception => e # rubocop:disable Lint/RescueException