150 Commits

Author SHA1 Message Date
Mike McQuaid
4a03603f68
Add HOMEBREW_NO_INSTALL_FROM_API
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>
2023-01-18 15:50:13 +00:00
Mike McQuaid
653b349c8b
Change HOMEBREW_INSTALL_FROM_API update frequency
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.
2023-01-18 15:11:42 +00:00
Patrick Linnane
f81857140f
docs: Fix env variable typo 2022-11-10 07:33:52 -08:00
Xuehai Pan
d3093cd260 resource: automatic determine mirrors for PyPI resources 2022-09-16 01:57:19 +08:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
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.
2022-09-05 13:57:22 +01:00
apainintheneck
85cf0ca6d4 Updated env variable docs on manpage
Updated docs for:
HOMEBREW_AUTOREMOVE
HOMEBREW_NO_CLEANUP_FORMULAE
2022-07-17 09:31:05 -07:00
apainintheneck
fa43418bfb Moved autoremove logic into autoremove.rb
This allows us to call that logic internally in other brew
commands instead of having to shell out.
2022-07-13 16:31:41 -07:00
apainintheneck
74f7b604cd Changed env variable to HOMEBREW_AUTOREMOVE 2022-07-13 16:28:49 -07:00
apainintheneck
f8ae5f3bc4 cmd/uninstall: Add env variable that runs autoremove after uninstalls
When HOMEBREW_UNINSTALL_AUTOREMOVE is set, `brew autoremove` is run
after every successful call to `brew uninstall`.
2022-07-13 16:28:49 -07:00
Mike McQuaid
22d6af1258
Manual brew style fixes. 2022-06-30 08:56:21 +01:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
Mike McQuaid
8cb5350d65
Revert "Merge pull request #13447 from notfromstatefarm/feature/support-custom-ssh"
This reverts commit ef00b40a5172d5628a0c861f655a2277fd16a1e0, reversing
changes made to e1fca95836fcb1ad989cd995228192846fc99612.
2022-06-28 09:42:50 +01:00
Mike McQuaid
ef00b40a51
Merge pull request #13447 from notfromstatefarm/feature/support-custom-ssh
support forcing brew-installed SSH for git operations
2022-06-23 10:14:55 +02:00
notfromstatefarm
8d76522be2
remove HOMEBREW_SSH_PATH 2022-06-22 19:22:48 -04:00
notfromstatefarm
bcce038d33
update env_config.rb 2022-06-22 19:22:44 -04:00
Carlo Cabrera
7435373dd8
env_config: clean up default text for HOMEBREW_LIVECHECK_WATCHLIST
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.
2022-06-22 11:26:23 +08:00
apainintheneck
3b65ecaf4c livecheck: fix path to livecheck watchlist 2022-06-21 17:57:19 -07:00
Mike McQuaid
77203e0760
Document HOMEBREW_CURL_PATH and HOMEBREW_GIT_PATH
- document both these variables in `man brew`
- allow them to be used on Linux without `HOMEBREW_DEVELOPER`
2022-06-14 10:33:30 +01:00
Mike McQuaid
78695938ae
cmd/update-report: always output new formulae.
There's near zero performance overhead and this seems good for
discovery.

Fixes #13412
2022-06-13 09:12:32 +01:00
Kid
721a27d68d dev-cmd/cat: support setting bat theme via environment variable 2022-06-06 08:44:47 +08:00
Mike McQuaid
04c8e02418
cmd/update-report: use better wording where appropriate.
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.
2022-06-03 19:23:38 +01:00
Mike McQuaid
00c5960a6a
Merge pull request #13299 from MikeMcQuaid/update_improvements
Improve updating behaviour
2022-05-24 13:05:24 +01:00
Mike McQuaid
6a1d899dbe
env_config: tweak wording. 2022-05-23 12:22:56 +01:00
Gordon Bleux
b2796ec7fb docs: clarify application of HOMEBREW_ARTIFACT_DOMAIN
bottle URLs are treated differently than any other URL.
this change clarifies the resulting URLs in the manpage.

closes #13222
2022-05-23 09:20:16 +02:00
Mike McQuaid
fb4c9353bb
Improve updating behaviour
- 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>
2022-05-19 11:04:20 -04:00
Mike McQuaid
d48a9337e4
Revert "update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on." 2022-02-28 09:54:12 +00:00
Mike McQuaid
10d5266361
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
This avoids reading formula files that the user hasn't explicitly
installed which both speeds up `brew update` and improves the security.
2022-02-22 10:01:24 +00:00
Zach Auten
7b2666eb9a
Add basic auth to curl download strategy, HOMEBREW_DOCKER_REGISTRY_TOKEN env variable 2022-01-06 09:41:09 -05:00
Mike McQuaid
6913c7c84e
Output environment variable hints.
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.
2021-11-26 13:14:10 +00:00
Mike McQuaid
11c5f8f05a
Improve discovery of some environment variables
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.
2021-11-25 09:10:59 +00:00
Mike McQuaid
4d1aeea36f
env_config: tweak HOMEBREW_INSTALL_FROM_API wording. 2021-10-27 11:43:15 +01:00
Rylan Polster
2e78389516
Improve HOMEBREW_INSTALL_FROM_API description 2021-10-27 02:09:55 -04:00
Mike McQuaid
9026b01b03
env_config: tweak install from API wording. 2021-10-25 11:25:07 +01:00
Rylan Polster
0b8032d421
Document HOMEBREW_INSTALL_FROM_API 2021-10-22 12:37:57 -04:00
Michka Popoff
1cc7ca33c0
update: migrate everyone from linuxbrew-core to homebrew-core
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-20 11:01:38 +01:00
Mike McQuaid
9b5f191db1
Merge pull request #12236 from knksmith57/support-custom-google-analytics-id-override
feat: support user-configured Google Analytics reporting
2021-10-20 10:42:03 +01:00
Bob Lail
c3e48b004d
Add HOMEBREW_SSH_CONFIG_PATH
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.
2021-10-20 09:01:57 +01:00
Kyle Smith
7866a4b586 feat: support user-configured Google Analytics reporting
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/>.
2021-10-19 10:49:43 -05:00
Michka Popoff
e8ee5b05f9
Migrate linuxbrew-core to homebrew-core on update.
- 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>
2021-10-11 21:04:58 +02:00
Bo Anderson
1952d27ba2
Install and use Homebrew's ca-certificates on macOS <= 10.15.5 2021-10-03 17:52:10 +01:00
fn ⌃ ⌥
35d6839b56 archive: delete 2021-09-30 09:50:04 -07:00
Freed-Wu
c126eacfe8 edit: change $HOMEBREW_BAT_CONFIG_PATH
Fix #11974
2021-09-05 23:11:03 +08:00
Michka Popoff
4ef058412c
brew.sh: set HOMEBREW_FORCE_HOMEBREW_CORE_REPO_ON_LINUX when core repo is homebrew-core
See https://github.com/Homebrew/install/pull/571

When the install script sets as https://github.com/Homebrew/homebrew-core,
we need to use the homebrew-core bottle domain, and correctly set
the HOMEBREW_CORE_DEFAULT_GIT_REMOTE below.

This also fixes the brew doctor issue for new homebrew-core Linux installations

Warning: Suspicious https://github.com/Homebrew/linuxbrew-core git origin remote found.
The current git origin is:
  https://github.com/Homebrew/homebrew-core

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
  git -C "/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/linuxbrew-core
2021-08-31 21:48:38 +02:00
Carlo Cabrera
a7133d2a8d
cleanup: allow users to specify formulae to skip cleaning
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.
2021-08-27 18:21:19 +08:00
Mike McQuaid
29ed4d216a
Revert "Remove HOMEBREW_BOTTLE_DOMAIN" 2021-07-29 21:15:40 +01:00
Mike McQuaid
5d8b5ceb22
Remove HOMEBREW_BOTTLE_DOMAIN
It no longer works under GitHub Packages and `HOMEBREW_ARTIFACT_DOMAIN`
must be used instead.
2021-07-27 14:12:17 +01:00
yahavi
0335d8c0bc Fix code review comments + disable authorization on redirections 2021-07-26 19:07:23 +03:00
yahavi
b8954030e3 Add support for private registry 2021-07-25 10:50:12 +03:00
Connor Mann
989e3cd2fa
Update HOMEBREW_NO_INSTALL_UPGRADE description 2021-06-11 13:48:25 -04:00
Connor Mann
b6cb3d2b6a
Add HOMEBREW_NO_INSTALL_UPGRADE 2021-06-10 15:06:12 -04:00