From cd584df82167002ef72b8231fa6e54c4183d4f1b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 4 Mar 2013 14:02:15 -0800 Subject: [PATCH] Fix git-version-gen.cmd when git.cmd is used. --- Windows/git-version-gen.cmd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Windows/git-version-gen.cmd b/Windows/git-version-gen.cmd index 553407fb9d..eaa42ba57d 100644 --- a/Windows/git-version-gen.cmd +++ b/Windows/git-version-gen.cmd @@ -22,12 +22,11 @@ set GIT_VERSION_FILE=%~p0..\git-version.cpp if not defined GIT ( set GIT="git" ) - -%GIT% describe > NUL 2> NUL +call %GIT% describe > NUL 2> NUL if errorlevel 1 ( echo Git not on path, trying default Msysgit paths set GIT="%ProgramFiles(x86)%\Git\bin\git.exe" - !GIT! describe > NUL 2> NUL + call !GIT! describe > NUL 2> NUL if errorlevel 1 ( set GIT="%ProgramFiles%\Git\bin\git.exe" ) @@ -41,7 +40,7 @@ if exist "%GIT_VERSION_FILE%" ( ) ) -%GIT% describe --always > NUL 2> NUL +call %GIT% describe --always > NUL 2> NUL if errorlevel 1 ( echo Unable to update git-version.cpp, git not found. echo If you don't want to add it to your path, set the GIT environment variable. @@ -52,7 +51,7 @@ if errorlevel 1 ( goto done ) -for /F %%I IN ('%GIT% describe --always') do set GIT_VERSION=%%I +for /F %%I IN ('call %GIT% describe --always') do set GIT_VERSION=%%I rem // Don't modify the file if it already has the current version. if exist "%GIT_VERSION_FILE%" (