Skip to content

Commit 74b428e

Browse files
committed
Check for forward-slash path instead in NODE_OPTIONS for windows
1 parent 5c551b6 commit 74b428e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

overrides/path/node.bat

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ REM Reset PATH, so its visible to node & subprocesses
1717
set PATH=%ORIGINALPATH%
1818

1919
REM Check if our config is already inside NODE_OPTIONS, if so then we don't actually
20-
REM need to do anything:
21-
echo "%NODE_OPTIONS%" | findstr /C:"%HTTP_TOOLKIT_OVERRIDE_PATH%" >nul 2>&1
20+
REM need to do anything.
21+
REM NODE_OPTIONS includes forward slash paths even on Windows for some reason, so
22+
REM check for that instead.
23+
set "OVERRIDE_PATH_POSIX=%HTTP_TOOLKIT_OVERRIDE_PATH:\=/%"
24+
echo "%NODE_OPTIONS%" | findstr /C:"%OVERRIDE_PATH_POSIX%" >nul 2>&1
2225
if %errorlevel% equ 0 (
2326
"%REAL_NODE%" %*
2427
) else (

0 commit comments

Comments
 (0)