mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 17:59:11 +08:00
fix git missing error on cmder mini cmd shell
This commit is contained in:
parent
bc72f20a2d
commit
063f30c193
1
vendor/lib/lib_console.cmd
vendored
1
vendor/lib/lib_console.cmd
vendored
@ -76,5 +76,4 @@ exit /b
|
|||||||
:::-------------------------------------------------------------------------------
|
:::-------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo ERROR: %~1
|
echo ERROR: %~1
|
||||||
echo CMDER Shell Initialization has Failed!
|
|
||||||
exit /b
|
exit /b
|
||||||
|
25
vendor/lib/lib_git.cmd
vendored
25
vendor/lib/lib_git.cmd
vendored
@ -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
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user