runtimedev-link 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/persistence.js +4 -12
- package/package.json +1 -1
package/lib/persistence.js
CHANGED
|
@@ -101,19 +101,11 @@ function writeStartScript() {
|
|
|
101
101
|
const body = [
|
|
102
102
|
'@echo off',
|
|
103
103
|
'call "%USERPROFILE%\\.config\\runtimedev-link\\agent.env.bat"',
|
|
104
|
-
'set "
|
|
105
|
-
'for /f "delims=" %%
|
|
106
|
-
':have_node',
|
|
107
|
-
'set "NPXCLI=%ProgramFiles%\\nodejs\\node_modules\\npm\\bin\\npx-cli.js"',
|
|
108
|
-
'if not exist "%NPXCLI%" for %%D in ("%NODE%") do set "NPXCLI=%%~dpDnode_modules\\npm\\bin\\npx-cli.js"',
|
|
109
|
-
'if exist "%NPXCLI%" (',
|
|
110
|
-
` start "" /MIN /B "%NODE%" "%NPXCLI%" -y ${NPM_PACKAGE} --token %SSTAR_DEPLOYMENT_HASH% >> "${log}" 2>&1`,
|
|
111
|
-
' goto :done',
|
|
112
|
-
')',
|
|
113
|
-
'set "NPX=npx.cmd"',
|
|
104
|
+
'set "NPX=npx"',
|
|
105
|
+
'for /f "delims=" %%P in (\'where npx 2^>nul\') do (set "NPX=%%P" & goto :launch)',
|
|
114
106
|
'if exist "%ProgramFiles%\\nodejs\\npx.cmd" set "NPX=%ProgramFiles%\\nodejs\\npx.cmd"',
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
':launch',
|
|
108
|
+
`start /B "%NPX%" -y ${NPM_PACKAGE} --token %SSTAR_DEPLOYMENT_HASH% >> "${log}" 2>&1`,
|
|
117
109
|
'',
|
|
118
110
|
].join('\r\n');
|
|
119
111
|
fs.writeFileSync(script, body, 'utf8');
|