mirror of
https://github.com/cmderdev/cmder.git
synced 2025-04-16 22:52:32 +08:00
cleanup
This commit is contained in:
parent
25ccfeed77
commit
4d15730d05
9
vendor/lib/lib_path.cmd
vendored
9
vendor/lib/lib_path.cmd
vendored
@ -1,6 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
call "%~dp0lib_base.cmd"
|
call "%~dp0lib_base.cmd"
|
||||||
call "%%~dp0lib_console"
|
call "%%~dp0lib_console"
|
||||||
set lib_path=call "%~dp0lib_path.cmd"
|
set lib_path=call "%~dp0lib_path.cmd"
|
||||||
@ -32,13 +31,12 @@ exit /b
|
|||||||
:::options:
|
:::options:
|
||||||
:::
|
:::
|
||||||
::: append <in> Append to the path env variable rather than pre-pend.
|
::: append <in> Append to the path env variable rather than pre-pend.
|
||||||
::B
|
:::
|
||||||
:::
|
:::
|
||||||
:::output:
|
:::output:
|
||||||
:::
|
:::
|
||||||
::: path <out> Sets the path env variable if required.
|
::: path <out> Sets the path env variable if required.
|
||||||
:::-------------------------------------------------------------------------------
|
:::-------------------------------------------------------------------------------
|
||||||
|
|
||||||
if "%~1" neq "" (
|
if "%~1" neq "" (
|
||||||
set "add_path=%~1"
|
set "add_path=%~1"
|
||||||
) else (
|
) else (
|
||||||
@ -53,6 +51,7 @@ exit /b
|
|||||||
)
|
)
|
||||||
|
|
||||||
dir "%add_path%" 2>NUL | findstr -i "\.COM \.EXE \.BAT \.CMD \.PS1 \.VBS" >NUL
|
dir "%add_path%" 2>NUL | findstr -i "\.COM \.EXE \.BAT \.CMD \.PS1 \.VBS" >NUL
|
||||||
|
|
||||||
if "%ERRORLEVEL%" == "0" (
|
if "%ERRORLEVEL%" == "0" (
|
||||||
set "add_to_path=%add_path%"
|
set "add_to_path=%add_path%"
|
||||||
) else (
|
) else (
|
||||||
@ -135,7 +134,6 @@ exit /b
|
|||||||
|
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
|
|
||||||
:set_found
|
:set_found
|
||||||
if "%ERRORLEVEL%" == "0" (
|
if "%ERRORLEVEL%" == "0" (
|
||||||
set found=1
|
set found=1
|
||||||
@ -223,7 +221,7 @@ exit /b
|
|||||||
|
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
: set_depth
|
:set_depth
|
||||||
set /a "depth=%depth%+1"
|
set /a "depth=%depth%+1"
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
@ -239,4 +237,3 @@ exit /b
|
|||||||
%print_debug% :enhance_path_recursive "Env Var AFTER- depth=%depth%"
|
%print_debug% :enhance_path_recursive "Env Var AFTER- depth=%depth%"
|
||||||
)
|
)
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user