Are git subcommands overriding PATH variable? #4651
Unanswered
GlassGruber
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Yes. We need to do this to avoid picking up random incompatible unix-ish executables along the way (cygwin executables, MS curl, MS find, winavr, ...). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I made a simple script that use curl for a git subcommand, but discovered that the script is not using the version of curl (v8.4.0) I have installed on my machine but the one provided by the git for Windows distribution (curl v8.2.1). When I use curl normally from the shell the correct one installed is picked up as expected.
I didn't file an issue because maybe there is something I'm missing since I'm using the portable version.
I'm using Git for Windows PortableGit-2.42.0.2-64-bit.7z.exe with curl v8.2.1
For what I can tell the PATH is edited before the git subcommand execution, and the folders in git for windows
mingw64
folder are inserted before my PATH.By copying the following example code in a file named like
git-curlpath
and placing it in a folder inside your PATH, should reproduce my issue.In my case this is the output (with minor redaction):
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions