Merge pull request #4111 from MikeMcQuaid/missing-formula-improve-migration-messaging

missing_formula: improve migration messaging.
This commit is contained in:
Mike McQuaid 2018-04-25 10:40:33 +01:00 committed by GitHub
commit 29f7d3d7ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ module Homebrew
new_tap = old_tap.tap_migrations[name]
next unless new_tap
new_tap_user, new_tap_repo, = new_tap.split("/")
new_tap_user, new_tap_repo, new_tap_new_name = new_tap.split("/")
new_tap_name = "#{new_tap_user}/#{new_tap_repo}"
message = <<~EOS
@ -101,9 +101,18 @@ module Homebrew
EOS
break if new_tap_name == CoreTap.instance.name
install_cmd = if new_tap_user == "caskroom"
"cask install"
else
"install"
end
new_tap_new_name ||= name
message += <<~EOS
You can access it again by running:
brew tap #{new_tap_name}
And then you can install it by running:
brew #{install_cmd} #{new_tap_new_name}
EOS
break
end