From ef59a751f4ee904b4e713d1069a67ed9ee03b766 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 27 May 2017 10:15:37 +0100 Subject: 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. ``` --- Library/Homebrew/exceptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/exceptions.rb') diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 6751b2224..5001c550d 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -325,7 +325,7 @@ class FormulaConflictError < RuntimeError def message message = [] - message << "Cannot install #{formula.full_name} because conflicting formulae are installed.\n" + message << "Cannot install #{formula.full_name} because conflicting formulae are installed." message.concat conflicts.map { |c| conflict_message(c) } << "" message << <<-EOS.undent Please `brew unlink #{conflicts.map(&:name)*" "}` before continuing. -- cgit v1.2.3