diff --git a/vendor/lib/lib_base.cmd b/vendor/lib/lib_base.cmd index f7420ef..39371c7 100644 --- a/vendor/lib/lib_base.cmd +++ b/vendor/lib/lib_base.cmd @@ -4,7 +4,7 @@ set lib_base=call "%~dp0lib_base.cmd" if "%~1" == "/h" ( %lib_base% help "%~0" -) else if "%1" neq "" ( +) else if "%~1" neq "" ( call :%* ) diff --git a/vendor/lib/lib_console.cmd b/vendor/lib/lib_console.cmd index c3649cc..600655f 100644 --- a/vendor/lib/lib_console.cmd +++ b/vendor/lib/lib_console.cmd @@ -14,7 +14,7 @@ if %fast_init% gtr %verbose_output% if %fast_init% gtr %debug_output% exit /b if "%~1" == "/h" ( %lib_base% help "%~0" -) else if "%1" neq "" ( +) else if "%~1" neq "" ( call :%* ) diff --git a/vendor/lib/lib_git.cmd b/vendor/lib/lib_git.cmd index 7b3bc47..db618cc 100644 --- a/vendor/lib/lib_git.cmd +++ b/vendor/lib/lib_git.cmd @@ -1,12 +1,12 @@ @echo off call "%~dp0lib_base.cmd" -call "%%~dp0lib_console.cmd" +call "%~dp0lib_console.cmd" set lib_git=call "%~dp0lib_git.cmd" if "%~1" == "/h" ( %lib_base% help "%~0" -) else if "%1" neq "" ( +) else if "%~1" neq "" ( call :%* ) diff --git a/vendor/lib/lib_path.cmd b/vendor/lib/lib_path.cmd index 3e68684..a322b52 100644 --- a/vendor/lib/lib_path.cmd +++ b/vendor/lib/lib_path.cmd @@ -1,12 +1,12 @@ @echo off call "%~dp0lib_base.cmd" -call "%%~dp0lib_console" +call "%~dp0lib_console.cmd" set lib_path=call "%~dp0lib_path.cmd" if "%~1" == "/h" ( %lib_base% help "%~0" -) else if "%1" neq "" ( +) else if "%~1" neq "" ( call :%* ) @@ -48,7 +48,7 @@ exit /b set "add_path=%~1" ) else ( %print_error% "You must specify a directory to add to the path!" - exit 1 + exit /b 1 ) if "%~2" neq "" if /i "%~2" == "append" ( @@ -72,7 +72,7 @@ exit /b set "PATH=%add_to_path%;%PATH%" ) goto :end_enhance_path - ) else if "add_to_path" equ "" ( + ) else if "%add_to_path%" equ "" ( goto :end_enhance_path ) @@ -84,20 +84,20 @@ exit /b setlocal enabledelayedexpansion if "!found!" == "0" ( - echo "!path!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!;" + echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!;" call :set_found ) %print_debug% :enhance_path "Env Var INSIDE PATH !find_query! - found=!found!" if /i "!position!" == "append" ( if "!found!" == "0" ( - echo "!path!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!\"$" + echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!\"$" call :set_found ) %print_debug% :enhance_path "Env Var END PATH !find_query! - found=!found!" ) else ( if "!found!" == "0" ( - echo "!path!"|!WINDIR!\System32\findstr >nul /I /R /C:"^\"!find_query!;" + echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:"^\"!find_query!;" call :set_found ) %print_debug% :enhance_path "Env Var BEGIN PATH !find_query! - found=!found!" @@ -119,7 +119,7 @@ exit /b :end_enhance_path set "PATH=%PATH:;;=;%" - REM echo %path%|"C:\Users\dgames\cmder - dev\vendor\git-for-windows\usr\bin\wc" -c + REM echo %PATH%|wc -c if "%fast_init%" == "1" exit /b if not "%OLD_PATH:~0,3000%" == "%OLD_PATH:~0,3001%" goto :toolong @@ -142,7 +142,7 @@ exit /b exit /b :changed - %print_debug% :enhance_path "END Env Var - PATH=%path%" + %print_debug% :enhance_path "END Env Var - PATH=%PATH%" %print_debug% :enhance_path "Env Var %find_query% - found=%found%" exit /b @@ -190,7 +190,7 @@ exit /b set "add_path=%~1" ) else ( %print_error% "You must specify a directory to add to the path!" - exit 1 + exit /b 1 ) set "depth=%~2" diff --git a/vendor/lib/lib_profile.cmd b/vendor/lib/lib_profile.cmd index 050beac..2a72e9d 100644 --- a/vendor/lib/lib_profile.cmd +++ b/vendor/lib/lib_profile.cmd @@ -1,12 +1,12 @@ @echo off call "%~dp0lib_base.cmd" -call "%%~dp0lib_console" +call "%~dp0lib_console.cmd" set lib_profile=call "%~dp0lib_profile.cmd" if "%~1" == "/h" ( %lib_base% help "%~0" -) else if "%1" neq "" ( +) else if "%~1" neq "" ( call :%* )