Skip to content

Commit 00ee967

Browse files
committed
Fix Windows $PATH overrides in powershell, and simplify en route
We didn't use this var previously since it wasn't set until the recent-ish PHP scandir changes, but it's definitely better to just pass the path explicitly rather than trying to detect it. Haven't changed Linux just to avoid churn because it's a little complicated to confirm the equivalent and test every possible case, but we absolutely could if we ever have issues with the current setup there.
1 parent 3c9452c commit 00ee967

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

overrides/path/node.bat

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ SETLOCAL
33

44
REM Exclude ourselves from PATH within this script, to avoid recursing
55
set ORIGINALPATH=%PATH%
6-
REM Get the current file's folder
7-
set THIS_PATH=%~dp0
8-
REM Strip the trailing slash from the folder
9-
set WRAPPER_FOLDER=%THIS_PATH:~0,-1%
10-
REM Remove that folder from PATH
6+
set WRAPPER_FOLDER=%HTTP_TOOLKIT_OVERRIDE_PATH%\path
117
call set PATH=%%PATH:%WRAPPER_FOLDER%;=%%
128

139
REM Get the real node path, store it in %REAL_NODE%

overrides/path/php.bat

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ SETLOCAL
33

44
REM Exclude ourselves from PATH within this script, to avoid recursing
55
set ORIGINALPATH=%PATH%
6-
REM Get the current file's folder
7-
set THIS_PATH=%~dp0
8-
REM Strip the trailing slash from the folder
9-
set WRAPPER_FOLDER=%THIS_PATH:~0,-1%
10-
REM Remove that folder from PATH
6+
set WRAPPER_FOLDER=%HTTP_TOOLKIT_OVERRIDE_PATH%\path
117
call set PATH=%%PATH:%WRAPPER_FOLDER%;=%%
128

139
REM Get the real php path, store it in %REAL_PHP%

0 commit comments

Comments
 (0)