You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Look for bash in (git root)/usr/bin not (git root)/bin
This is to help support running them with a shell from the Git for
Windows SDK, which, relative to the directory where it's installed
in, provides a `usr/bin` directory with a `bash.exe` executable,
like the same-named directory in a non-SDK full installation of Git
for Windows via the installer or PortableGit or or via package
managers such as `scoop` that repackage PortableGit, but unlike
those other installations does not provide a `bin` directory.
Inside the MSYS2 "Git Bash" provided as part of the Git for
Windows SDK, there are both `/bin` and `/usr/bin` directories, but
this not related to the `bin` subdirectory of the root of the
installation. On both regular Git for Windows "Git Bash" and Git
for Windows SDK "Git Bash" environments, `/bin` in the environment
is mounted to refer to the same directory as `/usr/bin`. In both,
this is separate from `(git root)/bin` as accessed outside that
environment.
For example, in an SDK "Git Bash":
$ mount
C:/git-sdk-64 on / type ntfs (binary,noacl,auto)
C:/git-sdk-64/usr/bin on /bin type ntfs (binary,noacl,auto)
C:/Users/ek/AppData/Local/Temp on /tmp type ntfs (binary,noacl,posix=0,usertemp)
C: on /c type ntfs (binary,noacl,posix=0,user,noumount,auto)
$ cygpath -w /bin /usr/bin
C:\git-sdk-64\usr\bin
C:\git-sdk-64\usr\bin
And in a non-SDK "Git Bash":
$ mount
C:/Users/ek/AppData/Local/Temp on /tmp type ntfs (binary,noacl,posix=0,usertemp)
C:/Users/ek/scoop/apps/git/2.48.1 on / type ntfs (binary,noacl,auto)
C:/Users/ek/scoop/apps/git/2.48.1/usr/bin on /bin type ntfs (binary,noacl,auto)
C: on /c type ntfs (binary,noacl,posix=0,user,noumount,auto)
$ cygpath -w /bin /usr/bin
C:\Users\ek\scoop\apps\git\2.48.1\usr\bin
C:\Users\ek\scoop\apps\git\2.48.1\usr\bin
The former has another `bin` directory alongside the `usr` directory
on disk, containing shims for `git.exe`, `sh.exe`, and `bash.exe`,
while the latter does not, but in neither case does `/bin` inside
Git Bash refer to it. This other `bin` directory was formerly used
to find `bash.exe` to run test fixture scripts.
A possible reason to continue using `(git root)/bin` would be if
the shims modify the environment in a way that makes the fixtures
operate better.
0 commit comments