Closed jacktose closed 3 years ago
I know this stretches the definition of “reproducible,” but I am posting an issue per suggestion (https://github.com/Homebrew/brew/issues/10762#issuecomment-789929888).
If this can be fixed by a (modest) PR, I'm happy to take a crack at it, if someone will point me in the right direction.
Thanks for the report @jacktose.
Or any other method of coercing homebrew to use known-good git and curl in non-standard locations.
Out of interest: do either HOMEBREW_FORCE_BREWED_CURL
or HOMEBREW_FORCE_BREWED_GIT
work how you'd want/expect?
@MikeMcQuaid I assume not currently, because I don't have brewed curl or git installed.* I'm happy to try if it's informative.
* Two reasons: 1. Recentish curl is an installation requirement for brew itself—or is it for gcc/glibc?—anyway, I had to build my own curl on this system to get brew going in the first place.
I think #1 also means HOMEBREW_FORCE_BREWED_CURL
can't be the only solution, or how else could I bootstrap brew with an old system curl?
HOMEBREW_CURL_PATH
and HOMEBREW_GIT_PATH
seems like the way to go - I've seen it used a few times, for bootstrapping in particular. In fact, even when brewed curl and git are automatically used, warning messages are still printed encouraging people to update system git.
They could probably be ungated from HOMEBREW_DEVELOPER
. I don't really any reason to try stop people from using it - it's certainly way better than HOMEBREW_NO_ENV_FILTERING
.
@Bo98 That's a modest PR, alright. Opened #10796 to consider it. ~(Still have to figure out how to do tests
, style`, etc.)~
In fact, even when brewed curl and git are automatically used, warning messages are still printed encouraging people to update system git.
This should be fixed.
They could probably be ungated from
HOMEBREW_DEVELOPER
. I don't really any reason to try stop people from using it - it's certainly way better thanHOMEBREW_NO_ENV_FILTERING
.
It's better but the "I'm using a random Git/Curl and now my Homebrew is broken" is a thing. If we're going to enable (and document) this when I think it needs to check if the curl
and git
actually work, are new enough and fail early and hard if not.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
brew config
outputbrew doctor
outputSorry about the mess. I don't control this system.
(full output)
brew doctor
above contains no "Warning" lines.What were you trying to do (and why)?
What
Use homebrew without unsupported options (
HOMEBREW_DEVELOPER
&HOMEBREW_NO_ENV_FILTERING
), when appropriate versions of git and curl are not in homebrew's expected path.Why
This system (for reasons unbeknownst to me) has ancient versions at
/bin/git
&/usr/bin/curl
, below homebrew's minimum version of each. Recent versions are available at/usr/local/bin/git
&~/bin/curl
, which are earlier in my PATH. You can see what I mean here. By default, homebrew usesPATH="/usr/bin:/bin:/usr/sbin:/sbin"
, so it finds the old versions and not the recent ones, and complains. Example here.What happened (include all command output)?
When running most
brew
commands with default settings, brew warns about below-minimum versions of git and curl. (I will usebrew config
for examples, because it throws the errors but still completes, and shows some relevant info. Full examples in gist.)(full output)
Some time ago, I set
export HOMEBREW_NO_ENV_FILTERING=1
, which stopsbrew
from setting its own path. Instead it uses mine and finds the better git and curl.However,
HOMEBREW_NO_ENV_FILTERING
recently triggered an issue, and is undocumented, unsupported, and untested. That issue affected me, so per @Bo98's advice, I am looking for a way to run brew stably with unusual git and curl paths. I tried settingHOMEBREW_GIT_PATH=/usr/local/bin/git
&HOMEBREW_CURL_PATH="$HOME/bin/curl"
but they have no effect alone. They only apply (and solve my problem) when also settingHOMEBREW_DEVELOPER=1
, which is also not recommended for stable operation.What did you expect to happen?
Ideally for me, homebrew would use the git and curl found in my PATH. I understand why that's not supportable. Perhaps in the special case of below-minimum versions of git and curl, it could look for appropriate versions in the user PATH?
Next best, I'd like to export the
_PATH
variables and have homebrew respect them. I.e. this invocation would work for me:$ HOMEBREW_DEVELOPER= HOMEBREW_NO_ENV_FILTERING= HOMEBREW_GIT_PATH=/usr/local/bin/git HOMEBREW_CURL_PATH="$HOME/bin/curl" brew config
Perhaps they don't need to be gated behind_DEVELOPER
, because a user who sets them presumably has reasons?Or any other method of coercing homebrew to use known-good git and curl in non-standard locations.
Step-by-step reproduction instructions (by running
brew
commands)"/usr/bin:/bin:/usr/sbin:/sbin"
) (but not yours).brew
commands.brew
commands with combinations of the following environment variables either unset or set as follows:HOMEBREW_DEVELOPER=1
HOMEBREW_NO_ENV_FILTERING=1
HOMEBREW_GIT_PATH=<recent version>
HOMEBREW_CURL_PATH=<recent version>