This should help with cases like
https://github.com/Homebrew/homebrew-bundle/issues/751
and is good practise in general.
Also, document the `brew update --preinstall` flag that is being used
here so others can run it manually e.g. as part of CI if needed.
Change the default locale from en_US.UTF-8 to C.UTF-8 on Linux.
The former locale is not included by default in common Docker images,
whereas the latter locale is included by default.
The default locale remains en_US.UTF-8 on macOS.
User may specify which cURL and Git to use via
HOMEBREW_CURL_PATH and HOMEBREW_GIT_PATH.
So, let's use these to determine whether we need to use
their vendored alternatives.
- Concourse CI uses `garden` under the hood for its containers.
- Running the Homebrew Docker container for a Concourse job was failing
with the "can't run as root" error. In the same way as
bc320ad2291f5ec652d8f4bcf3f7b7ff3c9af3bd, this adds `garden` as one of
the allowed providers.
This variable allows a user to configure how often `brew update` runs.
With the previous implementation, however, it was still pretty slow as
it would run some of `brew update` even within the timeout. This feels
related to complaints about Homebrew "feeling slow" since we enabled
this. Address this by:
- making `HOMEBREW_AUTO_UPDATE_SECS` behave more like
`HOMEBREW_NO_AUTO_UPDATE` and entirely skip the invocation of
`brew update` if the relevant tap (homebrew-core or homebrew-cask
depending on command invoked) has been checked in the last
`HOMEBREW_AUTO_UPDATE_SECS`
- Only require/check the update of a single tap rather than every tap
- Increase the default value of `HOMEBREW_AUTO_UPDATE_SECS` from 1m
to 5m to cut people a bit more slack. We're not updating things
often enough for 1m not to feel a bit overkill and 5m feels
appropriate for a Homebrew "session" to only require a single update.
Combined with https://github.com/Homebrew/homebrew-test-bot/pull/247
this will test Homebrew's use of frozen strings in CI. After this we
will then enable it for Homebrew developers and eventually all Homebrew
users.