From 6eaf882951a1f34e241b95d62c82abd347ca7a88 Mon Sep 17 00:00:00 2001 From: SandroHub013 Date: Sat, 23 May 2026 22:02:57 +0200 Subject: [PATCH] fix(app): spawn bun by absolute path in e2e-local to avoid Windows trampoline The Windows e2e job (`test (windows)`) failed deterministically: `bun script/e2e-local.ts` started, but its first child spawn `Bun.spawn(["bun", ...])` resolved `bun` through node_modules/.bin, where the hoisted-linker install on Windows (workaround for oven-sh/bun#28147) produces a broken .exe trampoline: error: could not create process Bun failed to remap this bin to its proper location within node_modules. Spawn the running bun binary by absolute path (process.execPath) instead of the bare string "bun" so the spawn no longer depends on trampoline resolution. Co-Authored-By: Claude Opus 4.7 --- packages/app/script/e2e-local.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/script/e2e-local.ts b/packages/app/script/e2e-local.ts index 9ac1b269a..aed4d45b5 100644 --- a/packages/app/script/e2e-local.ts +++ b/packages/app/script/e2e-local.ts @@ -83,7 +83,7 @@ const runnerEnv = { PLAYWRIGHT_PORT: String(webPort), } satisfies Record -const seed = Bun.spawn(["bun", "script/seed-e2e.ts"], { +const seed = Bun.spawn([process.execPath, "script/seed-e2e.ts"], { cwd: nikcliDir, env: serverEnv, stdout: "inherit", @@ -116,7 +116,7 @@ const result = await (async () => { try { await waitForHealth(`http://127.0.0.1:${serverPort}/global/health`) - const runner = Bun.spawn(["bun", "test:e2e", ...extraArgs], { + const runner = Bun.spawn([process.execPath, "test:e2e", ...extraArgs], { cwd: appDir, env: runnerEnv, stdout: "inherit",