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 ERROR: %~1
echo CMDER Shell Initialization has Failed!
exit /b exit /b

View File

@ -45,20 +45,17 @@ exit /b
%lib_console% debug-output :read_version "Env Var - git_executable=%git_executable%" %lib_console% debug-output :read_version "Env Var - git_executable=%git_executable%"
:: check if the executable actually exists :: check if the executable actually exists
if not exist "%git_executable%" ( if exist "%git_executable%" (
%lib_console% show_error "%git_executable%" does not exist! :: get the git version in the provided directory
exit /b -255 for /F "tokens=1,2,3 usebackq" %%A in (`"%git_executable%" --version 2^>nul`) do (
) if /i "%%A %%B" == "git version" (
set "GIT_VERSION_%~1=%%C"
:: get the git version in the provided directory %lib_console% debug-output :read_version "Env Var - GIT_VERSION_%~1=%%C"
for /F "tokens=1,2,3 usebackq" %%A in (`"%git_executable%" --version 2^>nul`) do ( ) else (
if /i "%%A %%B" == "git version" ( %lib_console% show_error "git --version" returned an inproper version string!
set "GIT_VERSION_%~1=%%C" pause
%lib_console% debug-output :read_version "Env Var - GIT_VERSION_%~1=%%C" exit /b
) else ( )
%lib_console% show_error "git --version" returned an inproper version string!
pause
exit /b
) )
) )