This allows HOMEBREW_INSTALL_FROM_API functionality to be disabled and will stick around once
HOMEBREW_INSTALL_FROM_API is made the default behaviour.
Co-authored-by: Eric Knibbe <enk3@outlook.com>
This doesn't need to be nearly as often for HOMEBREW_INSTALL_FROM_API users because we're getting the latest information from the API when needed rather than just at `brew update` time.
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.
Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
Follow up to #13453. The default values for our other environment
variables are typically wrapped in backticks, so let's do the same here
for consistency.
Closes#13455.
From reading https://github.com/orgs/Homebrew/discussions/3328: I
initially thought we should just change "Updated" to "Modified" when
appropriate. After conversation with Bo98, though, I thought more and
saw that we're already checking for outdated formulae here so, rather
than ever traverse through the formula history, look at the outdated
formula and list them unless we've set
`HOMEBREW_UPDATE_REPORT_ALL_FORMULAE` in which case we show the
modifications.
While we're here, also do a bit of reformatting and renaming to better
clarify intent.
- Rename use of "preinstall" to "auto update". The original "preinstall"
naming came from the fact that we used to only auto-update before
`brew install` but now that it's many commands: this is more confusing
than useful.
- Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove
`HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default
and the prior provides an opt-out for better output, performance and
avoiding reading potentially untrusted formulae.
- Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula
versions by default for better performance by default.
Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
Output hints for disabling automatic `brew update`, `brew cleanup` and
`brew upgrade`/`brew reinstall` of dependents. Also provide a
`HOMEBREW_NO_ENV_HINTS` to disable this messaging.
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents
For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
This allows specifying the path of an SSH config file that Homebrew should use instead of the default, `~/.ssh/config`, when fetching Git repos over SSH.
Allow users to set a custom Google Analytics tracking ID to report user behaviour
via new environment variable: $HOMEBREW_ADDITIONAL_GOOGLE_ANALYTICS_ID.
If provided, this tracking ID will be used _in addition to_ the default tracking
ID used by <https://brew.sh/analytics/>.
- Only for HOMEBREW_DEVELOPER
- Except for HOMEBREW_CORE_MERGE_MAINTAINER
- Except for GitHub Actions CI
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This allows users to set `HOMEBREW_NO_CLEANUP_FORMULAE` to a
comma-separated list of formulae that `brew` will refuse to clean with
`brew cleanup`.
We currently allow a less granular version of this with
`HOMEBREW_NO_INSTALL_CLEANUP`. All this changes is how much control
users have over what is and isn't cleaned.
Fixes#11924.