From 063f30c1936c931ea5b04013b55625a8a5242539 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Thu, 12 Apr 2018 21:32:38 -0400 Subject: [PATCH] fix git missing error on cmder mini cmd shell --- vendor/lib/lib_console.cmd | 1 - vendor/lib/lib_git.cmd | 25 +++++++++++-------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/vendor/lib/lib_console.cmd b/vendor/lib/lib_console.cmd index 38f40b4..d94561b 100644 --- a/vendor/lib/lib_console.cmd +++ b/vendor/lib/lib_console.cmd @@ -76,5 +76,4 @@ exit /b :::------------------------------------------------------------------------------- echo ERROR: %~1 - echo CMDER Shell Initialization has Failed! exit /b diff --git a/vendor/lib/lib_git.cmd b/vendor/lib/lib_git.cmd index 7ff9562..ce3d0c8 100644 --- a/vendor/lib/lib_git.cmd +++ b/vendor/lib/lib_git.cmd @@ -45,20 +45,17 @@ exit /b %lib_console% debug-output :read_version "Env Var - git_executable=%git_executable%" :: check if the executable actually exists - if not exist "%git_executable%" ( - %lib_console% show_error "%git_executable%" does not exist! - exit /b -255 - ) - - :: get the git version in the provided directory - 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" - %lib_console% debug-output :read_version "Env Var - GIT_VERSION_%~1=%%C" - ) else ( - %lib_console% show_error "git --version" returned an inproper version string! - pause - exit /b + if exist "%git_executable%" ( + :: get the git version in the provided directory + 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" + %lib_console% debug-output :read_version "Env Var - GIT_VERSION_%~1=%%C" + ) else ( + %lib_console% show_error "git --version" returned an inproper version string! + pause + exit /b + ) ) )