This commit is contained in:
Dax T. Games 2020-08-24 20:27:56 -04:00
parent cda883bc39
commit d1adf16fa8
3 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,4 @@
@echo off
setlocal
if "%~1" equ "" goto :wrongSyntax
@ -8,6 +7,7 @@ if not defined CMDER_USER_FLAGS (
set "CMDER_USER_FLAGS= "
)
set "feNot=false"
goto :parseArgument
@ -17,10 +17,8 @@ goto :parseArgument
:parseArgument
set "currenArgu=%~1"
if /i "%currenArgu%" equ "/setPath" (
:: set %flag_exists% shortcut
endlocal
set "ccall=call ^"%~dp0cexec.cmd^""
set "cexec=^"%~dp0cexec.cmd^""
set ccall=call "%~dp0cexec.cmd"
set cexec="%~dp0cexec.cmd"
) else if /i "%currenArgu%" == "/?" (
goto :help
) else if /i "%currenArgu%" equ "/help" (

7
vendor/init.bat vendored
View File

@ -265,14 +265,17 @@ if not defined git_locale for /F "tokens=* delims=" %%F in ('where locale.exe 2^
if not defined git_locale if exist "%GIT_INSTALL_ROOT%\usr\bin\env.exe" set git_locale="%GIT_INSTALL_ROOT%\usr\bin\env.exe" /usr/bin/locale
if not defined git_locale for /F "tokens=* delims=" %%F in ('where env.exe 2^>nul') do ( if not defined git_locale set git_locale="%%F" /usr/bin/locale )
setlocal enabledelayedexpansion
if defined git_locale (
%lib_console% debug_output init.bat "Env Var - git_locale=%git_locale%"
REM !lib_console! debug_output init.bat "Env Var - git_locale=!git_locale!"
if not defined LANG (
for /F "delims=" %%F in ('%git_locale% -uU 2') do (
for /F "delims=" %%F in ('!git_locale! -uU 2') do (
set "LANG=%%F"
)
)
)
endlocal && set LANG=%LANG%
%lib_console% debug_output init.bat "Env Var - GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%"
%lib_console% debug_output init.bat "Found Git in: '%GIT_INSTALL_ROOT%'"

View File

@ -231,8 +231,8 @@ exit /b
:::-------------------------------------------------------------------------------
:compare_git_versions
setlocal enabledelayedexpansion
if ERRORLEVEL 0 (
setlocal enabledelayedexpansion
:: compare the user git version against the vendored version
!lib_git! compare_versions USER VENDORED
@ -246,7 +246,6 @@ exit /b
) else (
!lib_console! verbose_output "Found old !GIT_VERSION_USER! in !test_dir!, but not using..."
)
endlocal && set "GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT% & set test_dir=
) else (
:: compare the user git version against the vendored version
:: if the user provided git executable is not found
@ -255,6 +254,7 @@ exit /b
set test_dir=
)
)
endlocal && set "GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%" && set test_dir=
exit /b