From 9a7aa627cc17495a615a74bf835055e7cd14a967 Mon Sep 17 00:00:00 2001 From: CrystalP Date: Sun, 1 Jan 2012 19:53:04 -0500 Subject: [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 --- project/Win32BuildSetup/extract_git_rev.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'project') diff --git a/project/Win32BuildSetup/extract_git_rev.bat b/project/Win32BuildSetup/extract_git_rev.bat index 6dcc723411..fedeb4b8ff 100644 --- a/project/Win32BuildSetup/extract_git_rev.bat +++ b/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 -- cgit v1.2.3