- Enable it by default if you've run a developer command or set
`HOMEBREW_DEVELOPER`.
- Clarify the documentation that there's various configuration in which
it doesn't work.
I've rolled this out of most of GitHub's developers with no ill effects
and we've enabled it in both CI and for various maintainers so it feels
appropriate to have a bigger rollout.
- Remove `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK` and make the behaviour
the default. We mostly already do this since we added the need for
the `--build-from-source` override on macOS. This allows us to
delete some more code.
- Still fail and require `--build-from-source` when reinstalling or
upgrading if failing on a formula-specific reason e.g. the CLT is
not/no longer installed, you're using a non-default prefix.
Fixes#10623
- A friend got an error message when trying to use `brew extract` and it
wasn't immediately obvious to me why. The usage banner only mentioned
the "formula" argument, which they'd provided. This improves the error
message when there aren't enough arguments so that others have a
chance of figuring out how to use this command without having to look
at the code for `extract_args`.
Before:
```
➜ brew extract --version='1.4' libftdi
Usage: brew extract [--version=] [--force] formula ...
[...]
Error: Invalid usage: this command requires a formula argument
```
After:
```
➜ brew extract --version='1.4' libftdi
Usage: brew extract [options] formula tap
[...]
Error: Invalid usage: This command requires at least 2 named arguments.
```
- I don't like the "at least 2" phrasing here but that's a dive into the
arg parsing code that I don't have time for right now. An alternative
was `named_args [:formula, :destination_tap]`, but that gave the error
message "requires formula or destination_tap" which wasn't great
either. I also tried `min: 2, max: 2` and that was the same "at least
2" message.
Add a shim and a command that can be used to easily add a single
directory to your `PATH` (`Library/Homebrew/shims/gems`) and have it
automatically install, configure and run `rubocop` so you can use it
for in-editor integrations.