add setlocal

This commit is contained in:
Dax T. Games 2020-08-23 08:47:20 -04:00
parent b1ef763922
commit cda883bc39

View File

@ -240,16 +240,13 @@ exit /b
if ERRORLEVEL 0 (
if exist "!test_dir:~0,-4!\cmd\git.exe" (
set "GIT_INSTALL_ROOT=!test_dir:~0,-4!"
set test_dir=
) else (
set "GIT_INSTALL_ROOT=!test_dir!"
set test_dir=
)
) else (
!lib_console! verbose_output "Found old !GIT_VERSION_USER! in !test_dir!, but not using..."
set test_dir=
)
endlocal && set "GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%
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