From a5157032f79bb995b374641e4626fb9cc18628c7 Mon Sep 17 00:00:00 2001 From: Hugo-DL Date: Mon, 23 Mar 2026 14:40:12 +0100 Subject: [PATCH] fix: add missing cwd to runScript spawn runScript() spawns Node with '--import tsx' but did not set cwd, causing tsx resolution to fail when npx openutter is run from a directory without tsx in its node_modules. Other spawn helpers (runNodeCommand, runPlaywrightCommand) already set cwd: pkgRoot. This aligns runScript with that pattern. Fixes #5 --- bin/openutter.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/openutter.mjs b/bin/openutter.mjs index 5f36a4c..7571857 100644 --- a/bin/openutter.mjs +++ b/bin/openutter.mjs @@ -209,6 +209,7 @@ function runScript(scriptName, args) { const result = spawnSync(process.execPath, ["--import", "tsx", scriptPath, ...args], { stdio: "inherit", + cwd: pkgRoot, }); if (result.error) {