We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccfabb0 commit 5080b0dCopy full SHA for 5080b0d
overrides/path/node.bat
@@ -0,0 +1,20 @@
1
+@echo off
2
+SETLOCAL
3
+
4
+REM Exclude ourselves from PATH within this script, to avoid recursing
5
+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
11
+call set PATH=%%PATH:%WRAPPER_FOLDER%;=%%
12
13
+REM Get the real node path, store it in %REAL_NODE%
14
+FOR /F "tokens=*" %%g IN ('where node') do (SET REAL_NODE=%%g)
15
16
+REM Reset PATH, so its visible to node & subprocesses
17
+set PATH=%ORIGINALPATH%
18
19
+REM Start Node for real, with an extra arg to inject our logic
20
+"%REAL_NODE%" -r "%WRAPPER_FOLDER%\prepend.js" %*
0 commit comments