Due to limitations of the test framework, this only tests
that the command with the --debug-symbols
flag succeeds and that on MacOS the `dsymutil` is run.
On MacOS, the compile flags `-g` are not set, and I can't figure out
how to set them here. `dsymutil` runs successfully regardless of if
there are debug symbols or not.
Same on linux therefore the test cannot succeed.
But only checks that the command works. Not that `dsymutil` is called
or that `-g` is added to the compile args.
(Not sure how to do either in an integration test.)
Fix breaking options on taps again (second time in two weeks, sob).
To avoid doing this again: also add a test for this case (that I've
verified would have caught these cases).
We have an awful lot of integration tests and they are (comparatively)
really slow. Let's kill those that test edge case conditions and focus
on those that test that our functionality works as expected. Edge cases
can be better tested with unit tests.
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.
```
If you `brew install` a formula that's already installed you get:
Warning: ripgrep-0.5.1 already installed
If you `brew install` an outdated formula that's installed you get:
Error: ripgrep-0.5.1 already installed. To install this version, first
`brew unlink ripgrep`
Instead, suggest that the user should `brew upgrade` in this case. If
the formula isn't outdated use the previous message.