upgrade: suggest full_name when appropriate.

Otherwise `brew install foo/bar/baz` when an older version of `baz` is
installed will tell you to run `brew upgrade baz` which won't work.
This commit is contained in:
Mike McQuaid 2020-03-11 17:06:42 +00:00
parent d0848a512d
commit 020d6e2843
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ module Homebrew
optlinked_version = Keg.for(f.opt_prefix).version
onoe <<~EOS
#{f.full_name} #{optlinked_version} is already installed
To upgrade to #{f.version}, run `brew upgrade #{f.name}`
To upgrade to #{f.version}, run `brew upgrade #{f.full_name}`
EOS
elsif args.only_dependencies?
formulae << f

View File

@ -228,7 +228,7 @@ class FormulaInstaller
EOS
if formula.outdated? && !formula.head?
message += <<~EOS
To upgrade to #{formula.pkg_version}, run `brew upgrade #{formula.name}`.
To upgrade to #{formula.pkg_version}, run `brew upgrade #{formula.full_name}`.
EOS
elsif only_deps?
message = nil