Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[WIN] more correct git command detection.

The command interpreter returns 9009 when the program to be executed is
not found.
Also have to be careful when testing returned value as IF errorlevel x
returns true for any errorlevel values >= x
  • Loading branch information...
commit 9a7aa627cc17495a615a74bf835055e7cd14a967 1 parent 22d0526
@CrystalP CrystalP authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 project/Win32BuildSetup/extract_git_rev.bat
View
4 project/Win32BuildSetup/extract_git_rev.bat
@@ -6,7 +6,7 @@ REM Batch file output: %GIT_REV% variable, containing the git revision
REM Use tgit.exe of TortoiseGit if available
SET GITEXE="tgit.exe"
%GITEXE% --version > NUL 2>&1
-IF errorlevel 1 GOTO :notgit
+IF errorlevel 9009 IF NOT errorlevel 9010 GOTO :notgit
GOTO :extract
:notgit
@@ -14,7 +14,7 @@ GOTO :extract
REM Fallback on msysgit - must be in the path
SET GITEXE="git.exe"
%GITEXE% --help > NUL 2>&1
-IF errorlevel 1 GOTO :nogit
+IF errorlevel 9009 IF NOT errorlevel 9010 GOTO :nogit
GOTO :extract
:nogit
Please sign in to comment.
Something went wrong with that request. Please try again.