Skip to content

Commit

Permalink
Search the GitHub Desktop git.exe path.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Aug 16, 2015
1 parent 4ddc12c commit c70d519
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Windows/git-version-gen.cmd
Expand Up @@ -33,14 +33,25 @@ 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 (
set GIT="%ProgramFiles%\Git\bin\git.exe"
)
)

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
Expand Down

0 comments on commit c70d519

Please sign in to comment.