fix git missing error on cmder mini cmd shell

This commit is contained in:
Dax T. Games 2018-04-12 21:32:38 -04:00
parent bc72f20a2d
commit 063f30c193
2 changed files with 11 additions and 15 deletions

View File

@ -76,5 +76,4 @@ exit /b
:::-------------------------------------------------------------------------------
echo ERROR: %~1
echo CMDER Shell Initialization has Failed!
exit /b

View File

@ -45,11 +45,7 @@ exit /b
%lib_console% debug-output :read_version "Env Var - git_executable=%git_executable%"
:: check if the executable actually exists
if not exist "%git_executable%" (
%lib_console% show_error "%git_executable%" does not exist!
exit /b -255
)
if exist "%git_executable%" (
:: get the git version in the provided directory
for /F "tokens=1,2,3 usebackq" %%A in (`"%git_executable%" --version 2^>nul`) do (
if /i "%%A %%B" == "git version" (
@ -61,6 +57,7 @@ exit /b
exit /b
)
)
)
endlocal & set GIT_VERSION%~1=!GIT_VERSION%~1!
exit /b