fix: use new URL() for cwd path in build.ts review generation step
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
083e2a7cfc
commit
00e37eeccd
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: import.meta.dir?.replace(/[^/\\]*$/, '') || '.',
|
cwd: new URL('.', import.meta.url).pathname,
|
||||||
})
|
})
|
||||||
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