brew/Library
Issy Long bda88ce96e
formula_auditor: Having HOMEBREW_PREFIX in keg_only reasons is bad
- 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
```
2023-03-18 14:46:13 +00:00
..
2023-03-14 23:01:08 -07:00
2021-03-15 19:41:06 +09:00

Library

This directory contains all the code run by the official brew command in Homebrew and all formulae (package descriptions) in taps (repositories containing formulae) in Taps subdirectories.