aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
authorMike McQuaid2017-05-27 10:15:37 +0100
committerMike McQuaid2017-05-27 10:15:37 +0100
commitef59a751f4ee904b4e713d1069a67ed9ee03b766 (patch)
tree33f0738ebd8ab1c816590e86bd18cdf0f7b7e227 /Library/Homebrew/formula_installer.rb
parentfb33acbbe47162adf90e92cbb6b244f26a5a346e (diff)
downloadbrew-ef59a751f4ee904b4e713d1069a67ed9ee03b766.tar.bz2
Improve some `brew install` messaging.
Improve the messaging around `brew install` when there's a possible user action such as an `upgrade` or `link` and don't tell people to `install --force` when it's unnecessary. While I did this, tweak the output and function usage in a couple of related places. Some example output before this change: ``` Warning: openssl is a keg-only and another version is linked to opt. Use `brew install --force` if you want to install this version Warning: mysql@5.6 is a keg-only and another version is linked to opt. Use `brew install --force` if you want to install this version Warning: analog-6.0_1 already installed Warning: bash-completion@2-2.5 already installed, it's just not linked. ``` Some example output after this change: ``` Error: openssl 1.0.2k is already installed To upgrade to 1.0.2l, run `brew upgrade openssl` Warning: mysql@5.6 5.6.36_1 is already installed Warning: analog 6.0_1 is already installed Warning: bash-completion@2 2.5 is already installed, it's just not linked. You can use `brew link bash-completion@2` to link this version. ```
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index f50d9ed9e..bbac860ae 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -218,7 +218,7 @@ class FormulaInstaller
# relink the active keg if possible (because it is slow).
if formula.linked_keg.directory?
message = <<-EOS.undent
- #{formula.name} #{formula.linked_keg.resolved_path.basename} is already installed
+ #{formula.name} #{formula.linked_version} is already installed
EOS
message += if formula.outdated? && !formula.head?
<<-EOS.undent