From d3259613dd3f1a8685bccc514d71a08048a32b78 Mon Sep 17 00:00:00 2001 From: RafalOfficial <248946250+RafalOfficial@users.noreply.github.com> Date: Thu, 22 Oct 2026 12:49:07 +0200 Subject: [PATCH] test: start pnpm through a shell on Windows in ensureBuilt ensureBuilt ran `pnpm build` with execFile, which cannot start the pnpm.cmd shim on Windows, so every suite that needs a built dist failed there with `spawn pnpm ENOENT`. Co-Authored-By: Claude Opus 5.5 --- packages/client/test/helpers/ensureBuilt.ts | 2 ++ packages/server/test/helpers/ensureBuilt.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/client/test/helpers/ensureBuilt.ts b/packages/client/test/helpers/ensureBuilt.ts index 4611a367c9..5ba15cef5d 100644 --- a/packages/client/test/helpers/ensureBuilt.ts +++ b/packages/client/test/helpers/ensureBuilt.ts @@ -93,7 +93,9 @@ export async function ensureBuilt(pkgDir: string): Promise { try { if (!haveAll()) { try { + // pnpm is a pnpm.cmd shim on Windows, which execFile can only start through a shell. await execFileAsync('pnpm', ['build'], { + shell: process.platform === 'win32', cwd: pkgDir, timeout: BUILD_TIMEOUT_MS, maxBuffer: 16 * 1024 * 1024 diff --git a/packages/server/test/helpers/ensureBuilt.ts b/packages/server/test/helpers/ensureBuilt.ts index e51ce463f9..ff7546bd51 100644 --- a/packages/server/test/helpers/ensureBuilt.ts +++ b/packages/server/test/helpers/ensureBuilt.ts @@ -87,7 +87,9 @@ export async function ensureBuilt(pkgDir: string): Promise { try { if (!haveAll()) { try { + // pnpm is a pnpm.cmd shim on Windows, which execFile can only start through a shell. await execFileAsync('pnpm', ['build'], { + shell: process.platform === 'win32', cwd: pkgDir, timeout: BUILD_TIMEOUT_MS, maxBuffer: 16 * 1024 * 1024