From 251968b4c6a420d2d2fc92a30e3c25c1abbe072b Mon Sep 17 00:00:00 2001 From: andyburgess Date: Fri, 21 Feb 2020 11:52:52 -0500 Subject: [PATCH] Fixes #2247, fixes #2254 --- vendor/init.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index c6f519d08..cd4e08038 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -188,6 +188,10 @@ for /F "delims=" %%F in ('where git.exe 2^>nul') do ( call :compare_git_versions ) +if defined GIT_INSTALL_ROOT ( + goto :FOUND_GIT +) + :: our last hope: our own git... :VENDORED_GIT if exist "%CMDER_ROOT%\vendor\git-for-windows" ( @@ -399,11 +403,9 @@ exit /b if %errorlevel% geq 0 if exist "%test_dir:~0,-4%\cmd\git.exe" ( set "GIT_INSTALL_ROOT=%test_dir:~0,-4%" set test_dir= - goto :FOUND_GIT ) else if %errorlevel% geq 0 ( set "GIT_INSTALL_ROOT=%test_dir%" set test_dir= - goto :FOUND_GIT ) else ( call :verbose_output Found old %GIT_VERSION_USER% in "%test_dir%", but not using... set test_dir=