From 1b9a87084bf7fba4f75006fc0efabcb5b3264489 Mon Sep 17 00:00:00 2001 From: Levi Date: Mon, 30 Mar 2026 13:57:30 -0600 Subject: [PATCH] fix: add shell option for Windows .cmd wrapper resolution On Windows, Node.js spawnSync cannot resolve .cmd wrappers (like codex.cmd and npm.cmd installed by npm global) without shell: true. This causes binaryAvailable() to return ENOENT for codex and npm even when they are properly installed. Conditionally enables shell: true on win32 only. --- plugins/codex/scripts/lib/process.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/codex/scripts/lib/process.mjs b/plugins/codex/scripts/lib/process.mjs index 000ecd2..b145ad8 100644 --- a/plugins/codex/scripts/lib/process.mjs +++ b/plugins/codex/scripts/lib/process.mjs @@ -7,7 +7,8 @@ export function runCommand(command, args = [], options = {}) { env: options.env, encoding: "utf8", input: options.input, - stdio: options.stdio ?? "pipe" + stdio: options.stdio ?? "pipe", + shell: process.platform === "win32" }); return {