Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSDavidSoft committed Nov 13, 2024
1 parent 7ceacb6 commit 1263470
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions vendor/lib/lib_path.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ exit /b
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!"
%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!\"$"
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 (
if "!found!" == "0" (
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!"
%print_debug% :enhance_path "Env Var BEGIN PATH !find_query! - found=!found!"
)
endlocal & set found=%found%

Expand Down Expand Up @@ -135,8 +135,8 @@ exit /b
exit /b

:changed
%print_debug% :enhance_path "END Env Var - PATH=%path%"
%print_debug% :enhance_path "Env Var %find_query% - found=%found%"
%print_debug% :enhance_path "END Env Var - PATH=%path%"
%print_debug% :enhance_path "Env Var %find_query% - found=%found%"
exit /b

exit /b
Expand Down Expand Up @@ -210,10 +210,10 @@ exit /b
exit /b
)

%print_debug% :enhance_path_recursive "Env Var - add_path=%add_to_path%"
%print_debug% :enhance_path_recursive "Env Var - position=%position%"
%print_debug% :enhance_path_recursive "Env Var - depth=%depth%"
%print_debug% :enhance_path_recursive "Env Var - max_depth=%max_depth%"
%print_debug% :enhance_path_recursive "Env Var - add_path=%add_to_path%"
%print_debug% :enhance_path_recursive "Env Var - position=%position%"
%print_debug% :enhance_path_recursive "Env Var - depth=%depth%"
%print_debug% :enhance_path_recursive "Env Var - max_depth=%max_depth%"

if %max_depth% gtr %depth% (
if "%add_to_path%" neq "" (
Expand All @@ -238,9 +238,9 @@ exit /b
)

for /d %%i in ("%add_path%\*") do (
%print_debug% :enhance_path_recursive "Env Var BEFORE - depth=%depth%"
%print_debug% :enhance_path_recursive "Env Var BEFORE - depth=%depth%"
%print_debug% :enhance_path_recursive "Found Subdirectory - '%%~fi'"
call :enhance_path_recursive "%%~fi" %depth% %max_depth% %position%
%print_debug% :enhance_path_recursive "Env Var AFTER- depth=%depth%"
%print_debug% :enhance_path_recursive "Env Var AFTER- depth=%depth%"
)
exit /b

0 comments on commit 1263470

Please sign in to comment.