fix inconsistencies

This commit is contained in:
David Refoua
2025-11-06 18:07:13 +03:30
committed by GitHub
parent 75d6973ccf
commit 006567cdbc
5 changed files with 534 additions and 534 deletions

View File

@@ -4,7 +4,7 @@ set lib_base=call "%~dp0lib_base.cmd"
if "%~1" == "/h" ( if "%~1" == "/h" (
%lib_base% help "%~0" %lib_base% help "%~0"
) else if "%1" neq "" ( ) else if "%~1" neq "" (
call :%* call :%*
) )

View File

@@ -14,7 +14,7 @@ if %fast_init% gtr %verbose_output% if %fast_init% gtr %debug_output% exit /b
if "%~1" == "/h" ( if "%~1" == "/h" (
%lib_base% help "%~0" %lib_base% help "%~0"
) else if "%1" neq "" ( ) else if "%~1" neq "" (
call :%* call :%*
) )

View File

@@ -1,12 +1,12 @@
@echo off @echo off
call "%~dp0lib_base.cmd" call "%~dp0lib_base.cmd"
call "%%~dp0lib_console.cmd" call "%~dp0lib_console.cmd"
set lib_git=call "%~dp0lib_git.cmd" set lib_git=call "%~dp0lib_git.cmd"
if "%~1" == "/h" ( if "%~1" == "/h" (
%lib_base% help "%~0" %lib_base% help "%~0"
) else if "%1" neq "" ( ) else if "%~1" neq "" (
call :%* call :%*
) )

View File

@@ -1,12 +1,12 @@
@echo off @echo off
call "%~dp0lib_base.cmd" call "%~dp0lib_base.cmd"
call "%%~dp0lib_console" call "%~dp0lib_console.cmd"
set lib_path=call "%~dp0lib_path.cmd" set lib_path=call "%~dp0lib_path.cmd"
if "%~1" == "/h" ( if "%~1" == "/h" (
%lib_base% help "%~0" %lib_base% help "%~0"
) else if "%1" neq "" ( ) else if "%~1" neq "" (
call :%* call :%*
) )
@@ -48,7 +48,7 @@ exit /b
set "add_path=%~1" set "add_path=%~1"
) else ( ) else (
%print_error% "You must specify a directory to add to the path!" %print_error% "You must specify a directory to add to the path!"
exit 1 exit /b 1
) )
if "%~2" neq "" if /i "%~2" == "append" ( if "%~2" neq "" if /i "%~2" == "append" (
@@ -72,7 +72,7 @@ exit /b
set "PATH=%add_to_path%;%PATH%" set "PATH=%add_to_path%;%PATH%"
) )
goto :end_enhance_path goto :end_enhance_path
) else if "add_to_path" equ "" ( ) else if "%add_to_path%" equ "" (
goto :end_enhance_path goto :end_enhance_path
) )
@@ -84,20 +84,20 @@ exit /b
setlocal enabledelayedexpansion setlocal enabledelayedexpansion
if "!found!" == "0" ( 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 call :set_found
) )
%print_debug% :enhance_path "Env Var INSIDE PATH !find_query! - found=!found!" %print_debug% :enhance_path "Env Var INSIDE PATH !find_query! - found=!found!"
if /i "!position!" == "append" ( if /i "!position!" == "append" (
if "!found!" == "0" ( 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 call :set_found
) )
%print_debug% :enhance_path "Env Var END PATH !find_query! - found=!found!" %print_debug% :enhance_path "Env Var END PATH !find_query! - found=!found!"
) else ( ) else (
if "!found!" == "0" ( 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 call :set_found
) )
%print_debug% :enhance_path "Env Var BEGIN PATH !find_query! - found=!found!" %print_debug% :enhance_path "Env Var BEGIN PATH !find_query! - found=!found!"
@@ -119,7 +119,7 @@ exit /b
:end_enhance_path :end_enhance_path
set "PATH=%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 "%fast_init%" == "1" exit /b
if not "%OLD_PATH:~0,3000%" == "%OLD_PATH:~0,3001%" goto :toolong if not "%OLD_PATH:~0,3000%" == "%OLD_PATH:~0,3001%" goto :toolong
@@ -142,7 +142,7 @@ exit /b
exit /b exit /b
:changed :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%" %print_debug% :enhance_path "Env Var %find_query% - found=%found%"
exit /b exit /b
@@ -186,7 +186,7 @@ exit /b
set "add_path=%~1" set "add_path=%~1"
) else ( ) else (
%print_error% "You must specify a directory to add to the path!" %print_error% "You must specify a directory to add to the path!"
exit 1 exit /b 1
) )
set "depth=%~2" set "depth=%~2"

View File

@@ -1,12 +1,12 @@
@echo off @echo off
call "%~dp0lib_base.cmd" call "%~dp0lib_base.cmd"
call "%%~dp0lib_console" call "%~dp0lib_console.cmd"
set lib_profile=call "%~dp0lib_profile.cmd" set lib_profile=call "%~dp0lib_profile.cmd"
if "%~1" == "/h" ( if "%~1" == "/h" (
%lib_base% help "%~0" %lib_base% help "%~0"
) else if "%1" neq "" ( ) else if "%~1" neq "" (
call :%* call :%*
) )