mirror of
https://github.com/cmderdev/cmder.git
synced 2025-07-06 20:49:02 +08:00
fix path with ! in dir
This commit is contained in:
19
vendor/lib/lib_path.cmd
vendored
19
vendor/lib/lib_path.cmd
vendored
@ -38,7 +38,6 @@ exit /b
|
||||
::: path <out> Sets the path env variable if required.
|
||||
:::-------------------------------------------------------------------------------
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
if "%~1" neq "" (
|
||||
set "add_path=%~1"
|
||||
) else (
|
||||
@ -58,9 +57,15 @@ exit /b
|
||||
) else (
|
||||
set "PATH=%add_path%;%PATH%"
|
||||
)
|
||||
goto :end_enhance_path
|
||||
)
|
||||
|
||||
set "PATH=%PATH:;;=;%"
|
||||
if "%fast_init%" == "1" (
|
||||
exit /b
|
||||
)
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set found=0
|
||||
set "find_query=%add_path%"
|
||||
set "find_query=%find_query:\=\\%"
|
||||
@ -125,7 +130,6 @@ exit /b
|
||||
:::.
|
||||
::: path <out> Sets the path env variable if required.
|
||||
:::-------------------------------------------------------------------------------
|
||||
setlocal enabledelayedexpansion
|
||||
if "%~1" neq "" (
|
||||
set "add_path=%~1"
|
||||
) else (
|
||||
@ -147,10 +151,15 @@ exit /b
|
||||
|
||||
if "%fast_init%" == "1" (
|
||||
call :enhance_path "%add_path%" %position%
|
||||
goto :end_enhance_path_recursive
|
||||
)
|
||||
|
||||
if "%depth%" == "" set depth=0
|
||||
set "PATH=%PATH:;;=;%"
|
||||
if "%fast_init%" == "1" (
|
||||
exit /b
|
||||
)
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
if "%depth%" == "" set depth=0
|
||||
|
||||
%lib_console% debug_output :enhance_path_recursive "Env Var - add_path=%add_path%"
|
||||
%lib_console% debug_output :enhance_path_recursive "Env Var - position=%position%"
|
||||
|
Reference in New Issue
Block a user