diff options
| author | Mike McQuaid | 2017-05-27 10:15:37 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-05-27 10:15:37 +0100 |
| commit | ef59a751f4ee904b4e713d1069a67ed9ee03b766 (patch) | |
| tree | 33f0738ebd8ab1c816590e86bd18cdf0f7b7e227 /Library/Homebrew/test | |
| parent | fb33acbbe47162adf90e92cbb6b244f26a5a346e (diff) | |
| download | brew-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/test')
| -rw-r--r-- | Library/Homebrew/test/cmd/install_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index b819c17be..6fff44131 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -23,7 +23,7 @@ describe "brew install", :integration_test do .and be_a_success expect { brew "install", "testball1" } - .to output(/testball1\-0\.1 already installed/).to_stderr + .to output(/testball1\ 0\.1 is already installed/).to_stderr .and not_to_output.to_stdout .and be_a_success @@ -51,7 +51,7 @@ describe "brew install", :integration_test do install_and_rename_coretap_formula "testball1", "testball2" expect { brew "install", "testball2" } .to output(/testball1 already installed, it's just not migrated/).to_stderr - .and output(/You can migrate formula with `brew migrate testball2`/).to_stdout + .and not_to_output.to_stdout .and be_a_success end @@ -106,8 +106,8 @@ describe "brew install", :integration_test do end expect { brew "install", "testball1" } - .to output(/already installed, however linked version is/).to_stderr - .and output(/`brew switch testball1 2.0`/).to_stdout + .to output(/2.0 is already installed/).to_stderr + .and not_to_output.to_stdout .and be_a_success expect { brew "unlink", "testball1" } @@ -141,8 +141,8 @@ describe "brew install", :integration_test do EOS expect { brew "install", "testball1" } - .to output(/keg-only and another version is linked to opt/).to_stderr - .and output(/Use `brew install --force`/).to_stdout + .to output(/testball1 1.0 is already installed/).to_stderr + .and not_to_output.to_stdout .and be_a_success expect { brew "install", "testball1", "--force" } @@ -185,7 +185,7 @@ describe "brew install", :integration_test do .and be_a_success expect { brew "install", "testball1", "--HEAD", "--ignore-dependencies" } - .to output(/testball1\-HEAD\-d5eb689 already installed/).to_stderr + .to output(/testball1 HEAD\-d5eb689 is already installed/).to_stderr .and not_to_output.to_stdout .and be_a_success |
