As a part of serializing the hash, certain path
placeholders are used for the HOMEBREW_PREFIX and $HOME
directories. Beyond that certain elements need to be
turned back into strings like cron and sockets and symbols
need to be preserved as well.
The run command accepts either an arg or kwargs so it
has to be treated specially here.
`install-info` is not shipped with macOS Ventura and some Linux
distros. This commit uses `install-info` from `texinfo` formula if it
is not available in `/usr/bin`.
See: https://github.com/Homebrew/discussions/discussions/4306
- Fixes issue 14996.
- The API JSON is generated with a `/usr/local` Homebrew prefix, but
frequently now users have `/opt/homebrew` as their prefix. Since
formulae `keg_only` reasons are generated by the API, this can lead
to the confusing messaging that follows:
```
socket_vmnet is keg-only, which means it was not symlinked into /opt/homebrew,
because /usr/local/bin is often writable by a non-admin user.
```
- With this change, that formula as it is now will fail `brew audit`,
prompting to remove the prefix reference.
```
❯ HOMEBREW_NO_INSTALL_FROM_API=1 brew audit --strict socket_vmnet
socket_vmnet:
* `keg_only` reason should not include `HOMEBREW_PREFIX` as it provides confusing output.
Error: 1 problem in 1 formula detected
```
- "System Preferences" was updated to be "System Settings" in macOS
Ventura. This naming was updated in our caveats generator in PR 14997.
- This test was failing for me locally (on Ventura) because it was
hardcoded to expect `System Preferences => Security & Privacy`, but
getting `System Settings => Privacy & Security`.
- This is not the most important thing in the world, we can probably
live with the failing test, but I thought I'd try to fix it anyway.
- This was pointed out by Carlo in
https://github.com/Homebrew/brew/issues/14925#issuecomment-1473303922,
it annoyed me the moment I saw it too, and it was a very quick fix.
- The caveats items are joined by "\n" before being displayed, so the
extra `\n` here when generating the `keg_only_text` meant that there
were two blank lines which looked weird. This `keg_only_text` method
is only used here so it doesn't affect anywhere else we show the
`keg_only` message, if there are any other places.
"System Preferences" has been renamed to "System Settings" on Ventura.
Privacy and security settings have moved, too. This commit makes sure
these changes are reflected. (Some adjustments were already made in
#14092.)
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
- Some casks have URL arguments like "referer" (spelled wrong, that's
intentional in the HTTP spec).
- The audit for one such cask, `iThoughtsX`, was failing because the
"referer" wasn't getting passed through to cURL so the access would
404.
----
Before:
```
❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
- The binary URL https://cdn.toketaware.com?download=iThoughtsX.zip is not reachable (HTTP status code 404)
- Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
- Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 2 problems in 1 cask detected
```
After:
```
❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
- Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
- Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 1 problem in 1 cask detected
```
This is useful for non-contributor users but won't be installed if they
don't have homebrew/core tapped (the default).
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
Add these commands to ease use of Homebrew's bottles with `rbenv` and
`nodenv`.
I've had a lot of people request this over the years and it's worked
well for me for a long time.
I could see people extending these to support other languages or version
managers so perhaps we want a more generic name.
Co-authored-by: Rylan Polster <rslpolster@gmail.com>