@proagentstore/cli 0.4.111 → 0.4.112
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/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1107,7 +1107,7 @@ import { Command as Command7 } from "commander";
|
|
|
1107
1107
|
// src/commands/runner/process.ts
|
|
1108
1108
|
import { spawn as spawn2 } from "child_process";
|
|
1109
1109
|
import { existsSync as existsSync6 } from "fs";
|
|
1110
|
-
import { resolve as resolve4 } from "path";
|
|
1110
|
+
import { resolve as resolve4, win32 } from "path";
|
|
1111
1111
|
import { createServer as createServer2 } from "net";
|
|
1112
1112
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
1113
1113
|
import { createRequire } from "module";
|
|
@@ -1156,6 +1156,9 @@ function runsFromSource() {
|
|
|
1156
1156
|
function bundledRunnerPath() {
|
|
1157
1157
|
return fileURLToPath2(new URL("./browser-runner/index.js", import.meta.url));
|
|
1158
1158
|
}
|
|
1159
|
+
function spawnNeedsShell(command, platform = process.platform) {
|
|
1160
|
+
return platform === "win32" && !win32.isAbsolute(command);
|
|
1161
|
+
}
|
|
1159
1162
|
function runnerSpawnSpec(opts) {
|
|
1160
1163
|
const root = findWorkspaceRoot();
|
|
1161
1164
|
const localPackage = resolve4(root, "packages", "browser-runner", "src", "index.ts");
|
|
@@ -1172,7 +1175,7 @@ function runnerSpawnSpec(opts) {
|
|
|
1172
1175
|
command = process.execPath;
|
|
1173
1176
|
args = [bundledPackage, ...runnerArgs];
|
|
1174
1177
|
}
|
|
1175
|
-
return { command, args, cwd };
|
|
1178
|
+
return { command, args, cwd, shell: spawnNeedsShell(command) };
|
|
1176
1179
|
}
|
|
1177
1180
|
function startRunnerForeground(opts) {
|
|
1178
1181
|
const spec = runnerSpawnSpec(opts);
|
|
@@ -1180,7 +1183,7 @@ function startRunnerForeground(opts) {
|
|
|
1180
1183
|
const child = spawn2(spec.command, spec.args, {
|
|
1181
1184
|
cwd: spec.cwd,
|
|
1182
1185
|
stdio: "inherit",
|
|
1183
|
-
shell:
|
|
1186
|
+
shell: spec.shell
|
|
1184
1187
|
});
|
|
1185
1188
|
child.on("error", reject);
|
|
1186
1189
|
child.on("exit", (code) => {
|
|
@@ -2797,7 +2800,7 @@ function createRunnerCommand() {
|
|
|
2797
2800
|
const runner = spawn4(spec.command, spec.args, {
|
|
2798
2801
|
cwd: spec.cwd,
|
|
2799
2802
|
stdio: ["ignore", "pipe", "pipe"],
|
|
2800
|
-
shell:
|
|
2803
|
+
shell: spec.shell,
|
|
2801
2804
|
// #896: the runtime answers `/health` with the lock's identity and stops for a
|
|
2802
2805
|
// request quoting its nonce — so a contender can prove who is on that port, and a
|
|
2803
2806
|
// replace is an authorisation rather than a signal aimed at a name pattern.
|