-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fixes Git detection on 64-bit Windows machines with 32-bit Git installed #324
Conversation
+1 P.S. Is it possible to detect in which directory Git installed? If user changes default installation directory, e.g. |
Thanks for the PR, and sorry for the delay in getting back. This could help solve multiple issues with the Toolbox relating to Git. Taking a look - |
Result := not DirExists('C:\Program Files\Git') or not FileExists('C:\Program Files\Git\git-bash.exe') | ||
GitRegKey := 'GitForWindows'; | ||
|
||
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Wow6432Node\' + GitRegKey, 'InstallPath', GitInstallPath) and FileExists(GitInstallPath + '\git-bash.exe') then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Any way this function could return the git path (and optionally Null)? This could be used to detect where to point the Docker Quickstart Terminal
to
Just a small comment - this is huge! Thank you! Big sorry for the late follow up |
Glad I could help. |
Thanks again! Could you squash & sign your commits before merging?
|
Signed-off-by: Adriano Marcondes Machado <adriano.m.machado@hotmail.com>
Done. |
9cb5363
to
9927093
Compare
It seems hard-coding the git install path isn't going to work, there will need to be a way to find the git shell. Today I reinstalled |
Hello all, I also noticed an issue (I have git installed in a non-standard location) and told the installer not to install git. The "Docker Quickstart Terminal" assumed it was located in c:\Program Files\Git\ (I believe) which would have been the standard location. I would suggest checking the registry HKLM\SOFTWARE\GitForWindows\InstallPath first and if that does not work run "where.exe git.exe" checking that directory for bash.exe (to clear out the edge cases where someone has a setup with a git.exe in path but does not have the bash.exe file there as well). If all of that fails I would just prompt the user to locate it. |
Git 32-bit is installed on
C:\Program Files (x86)\Git
instead ofC:\Program Files\Git
. Should shed some light on issues #226, #246, #295, #276 and #310.