@lifeaitools/clauth 2.15.4 → 2.15.5
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/cli/supervisor-registry.js +10 -2
- package/package.json +1 -1
|
@@ -1212,8 +1212,16 @@ export function runSurfaceAction(id, action, actor = "localhost") {
|
|
|
1212
1212
|
// a space (e.g. "C:\Program Files\nodejs\node.exe") breaks at the first
|
|
1213
1213
|
// space unless quoted. Bare shim names (pm2, npm) never contain spaces,
|
|
1214
1214
|
// so this only ever affects absolute-path values, and only on Windows.
|
|
1215
|
-
|
|
1216
|
-
|
|
1215
|
+
// Expand $LIFEAI_ENV / $REGEN_ROOT tokens in the command AND its args, the same
|
|
1216
|
+
// way surface.cwd is expanded at normalize time. A surface start such as
|
|
1217
|
+
// `pwsh -File $LIFEAI_ENV/services/restart-dev-center.ps1` (dev-center) or
|
|
1218
|
+
// `pm2 start $REGEN_ROOT/apps/codeflow-explorer/... ` otherwise reached the shell
|
|
1219
|
+
// with the literal token and failed ("not recognized as the name of a script
|
|
1220
|
+
// file", exit 64) — a start/restart that fails while the service stays down.
|
|
1221
|
+
// expandPathToken is a no-op on token-free values (pm2, --name, --cwd), so it is
|
|
1222
|
+
// safe on every arg.
|
|
1223
|
+
const resolvedCmd = shellQuote(expandPathToken(cmd) || cmd, useShell);
|
|
1224
|
+
const resolvedArgs = args.map((arg) => shellQuote(expandPathToken(arg) || arg, useShell));
|
|
1217
1225
|
return spawnSync(resolvedCmd, resolvedArgs, {
|
|
1218
1226
|
cwd: surface.cwd || undefined,
|
|
1219
1227
|
env: { ...process.env, CLAUTH_PM2_HOME: getClauthPm2Home(), PM2_HOME: getClauthPm2Home() },
|