[codex] Avoid shell for Node executable spawns (#2952)

Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
Julius MarmingeandJulius Marminge authored and GitHub committed 2026-06-04 15:14:07 -07:00
1 parent 49c1b64687
commit a74dfd4f3c
4 files changed
+3 -8

No files matched your search

-2
View File
@@ -175,8 +175,6 @@ const buildCmd = Command.make(
cwd: serverDir,
stdout: config.verbose ? "inherit" : "ignore",
stderr: "inherit",
// Windows needs shell mode to resolve `.cmd` shims on PATH.
shell: process.platform === "win32",
}),
);
+1 -2
View File
@@ -34,9 +34,8 @@ it.layer(NodeServices.layer)("effect-acp client", (it) => {
Effect.gen(function* () {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const path = yield* Path.Path;
const command = ChildProcess.make("node", mockPeerArgs(yield* mockPeerPath), {
const command = ChildProcess.make(process.execPath, mockPeerArgs(yield* mockPeerPath), {
cwd: path.join(import.meta.dirname, ".."),
shell: process.platform === "win32",
...(env ? { env: { ...process.env, ...env } } : {}),
});
return yield* spawner.spawn(command);
+1 -2
View File
@@ -57,9 +57,8 @@ const makeHandle = (env?: Record<string, string>) =>
Effect.gen(function* () {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const path = yield* Path.Path;
const command = ChildProcess.make("node", mockPeerArgs(yield* mockPeerPath), {
const command = ChildProcess.make(process.execPath, mockPeerArgs(yield* mockPeerPath), {
cwd: path.join(import.meta.dirname, ".."),
shell: process.platform === "win32",
...(env ? { env: { ...process.env, ...env } } : {}),
});
return yield* spawner.spawn(command);
@@ -22,9 +22,8 @@ it.layer(NodeServices.layer)("effect-codex-app-server client", (it) => {
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const path = yield* Path.Path;
const peerCwd = path.join(import.meta.dirname, "..");
const command = ChildProcess.make("node", mockPeerArgs(yield* mockPeerPath), {
const command = ChildProcess.make(process.execPath, mockPeerArgs(yield* mockPeerPath), {
cwd: peerCwd,
shell: process.platform === "win32",
});
return yield* spawner.spawn(command);
});