From 5b4d0c2ac1705313074586dcde4b897724f28dbf Mon Sep 17 00:00:00 2001 From: kingboung Date: Tue, 12 May 2026 17:20:27 +0800 Subject: [PATCH] fix: use process.cwd() for generate-review-builtin cwd on Windows URL pathname returns /E:/... on Windows which spawnSync can't resolve. Co-Authored-By: Claude Opus 4.7 --- build.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ts b/build.ts index 5ebc1e95f..928832367 100644 --- a/build.ts +++ b/build.ts @@ -13,7 +13,7 @@ console.log('Generating review builtin files...') const { spawnSync: genSpawnSync } = await import('child_process') const genResult = genSpawnSync('bun', ['run', 'scripts/generate-review-builtin.ts'], { stdio: 'inherit', - cwd: new URL('.', import.meta.url).pathname, + cwd: process.cwd(), }) if (genResult.status !== 0) { console.warn('Warning: generate-review-builtin.ts failed, using existing files')