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 <noreply@anthropic.com>
This commit is contained in:
parent
c374cab5ed
commit
5b4d0c2ac1
2
build.ts
2
build.ts
|
|
@ -13,7 +13,7 @@ console.log('Generating review builtin files...')
|
||||||
const { spawnSync: genSpawnSync } = await import('child_process')
|
const { spawnSync: genSpawnSync } = await import('child_process')
|
||||||
const genResult = genSpawnSync('bun', ['run', 'scripts/generate-review-builtin.ts'], {
|
const genResult = genSpawnSync('bun', ['run', 'scripts/generate-review-builtin.ts'], {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
cwd: new URL('.', import.meta.url).pathname,
|
cwd: process.cwd(),
|
||||||
})
|
})
|
||||||
if (genResult.status !== 0) {
|
if (genResult.status !== 0) {
|
||||||
console.warn('Warning: generate-review-builtin.ts failed, using existing files')
|
console.warn('Warning: generate-review-builtin.ts failed, using existing files')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user