diff --git a/Windows/git-version-gen.cmd b/Windows/git-version-gen.cmd index f2a10c1fa8..af41b801f8 100644 --- a/Windows/git-version-gen.cmd +++ b/Windows/git-version-gen.cmd @@ -33,7 +33,7 @@ if not defined GIT ( ) call %GIT% describe --always > NUL 2> NUL if errorlevel 1 ( - echo Git not on path, trying default Msysgit paths + echo Git not on path, trying default Msysgit paths... set GIT="%ProgramFiles(x86)%\Git\bin\git.exe" call !GIT! describe > NUL 2> NUL if errorlevel 1 ( @@ -41,6 +41,17 @@ if errorlevel 1 ( ) ) +call %GIT% describe --always > NUL 2> NUL +if errorlevel 1 ( + echo Git not on path, trying GitHub Desktop.. + rem // Cheating using short filenames. + set GIT="%USERPROFILE%\AppData\Local\GitHub\PORTAB~1\bin\git.exe" + call !GIT! describe > NUL 2> NUL + if errorlevel 1 ( + set GIT="%USERPROFILE%\AppData\Local\GitHub\PORTAB~2\bin\git.exe" + ) +) + call %GIT% describe --always > NUL 2> NUL if errorlevel 1 ( set GIT_MISSING=1