- For the command `brew install --cask racket`, a user was reporting the
behaviour where despite `--cask` in the command, they were getting
output about the `racket` formula having been renamed:
```
$ brew install --cask racket
Warning: Use minimal-racket instead of deprecated racket
==> Downloading https://mirror.racket-lang.org/installers/8.7/racket-8.7-x86_64-macosx-cs.
==> Installing Cask racket
[...]
racket was successfully installed!
```
- The "instead of deprecated ..." messaging comes from the `TapLoader`
class `formula_name_path` method, so _something_ must be assuming
that everything is initially a formula before _later_ learning from
further args parsing that there's a `--cask` qualifier to scope to
only casks.
- There are always `@formula_options` and args parsing is recursive,
going through each option, so we check that the original `argv` items
include a `--cask` and skip calling the `formulae` method if that's
the case.
- After this change, the "formula renames" words no longer show up.
```
$ brew install --cask racket
==> Downloading https://mirror.racket-lang.org/installers/8.7/racket-8.7-aarch64-macosx-cs.dmg
==> Installing Cask racket
[...]
racket was successfully installed!
```
This ability was removed around a month
ago but needs to be added back in.
Developers want to be able to use the
`bump` and `audit` commands when on Linux.
This is especially useful for CI.
1. Validate options before constraint violations. This allows
us to error out when --cask is passed on Linux before getting
a constraint violation when --cask and --formula are set.
2. Skip printing the help page when --cask is passed on Linux.
- There's already a method on `CLI::Parser`, we don't need to hand-roll
the "number of dashes" detection.
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
- Suppress (some more) warnings when doing `brew install --quiet`
- Clarify `man brew` output that we don't suppress all warnings
for all commands with `--quiet`
While I was doing this I noticed references to the (soon to be
deprecated) `brew switch` so:
- remove these references in `install` output
- remove a reference in the documentation
- add a comment to remind me to deprecate `brew diy`, too
Fixes#9179
Modify parser.rb to add a colon between each term and the line break, which `ronn` converts into a definition list.
The <br> that follows ensures each term description is on a new line in the manpage output, and also replaces the
double trailing space for generating the hard return that follows each term in the HTML output.
Also modify man.rb to print environment variables with list markup matching the cask commands, and then drop
trailing colons from both lists of terms (cask commands, env vars) and non-list terms (analytics, bundle, services;
a <br> is added here because it would prevent the term description from being indented in the manpage output).
https://docs.brew.sh/Manpage#cask-command-options-cask