diff --git a/scripts/build.ts b/scripts/build.ts index ad0364ee..ec91901e 100755 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -9,6 +9,7 @@ import * as p from '@clack/prompts' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const rootDir = path.resolve(__dirname, '..') +const isWindows = process.platform === 'win32' let childProcess: ReturnType | null = null @@ -59,6 +60,7 @@ async function runBuild(packageName: string, script: string): Promise { childProcess = spawn('pnpm', ['--filter', packageName, 'run', script], { stdio: 'inherit', cwd: rootDir, + shell: isWindows, }) childProcess.on('close', (code) => { diff --git a/scripts/dev.ts b/scripts/dev.ts index 316710fd..6955e8a6 100755 --- a/scripts/dev.ts +++ b/scripts/dev.ts @@ -9,6 +9,7 @@ import * as p from '@clack/prompts' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const rootDir = path.resolve(__dirname, '..') +const isWindows = process.platform === 'win32' let childProcess: ReturnType | null = null @@ -56,6 +57,7 @@ async function runDev(packageName: string): Promise { childProcess = spawn('pnpm', ['--filter', packageName, 'run', 'dev'], { stdio: 'inherit', cwd: rootDir, + shell: isWindows, }) childProcess.on('close', (code) => { diff --git a/scripts/serve.ts b/scripts/serve.ts index cc2ebb79..b07e3fd6 100755 --- a/scripts/serve.ts +++ b/scripts/serve.ts @@ -9,6 +9,7 @@ import * as p from '@clack/prompts' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const rootDir = path.resolve(__dirname, '..') +const isWindows = process.platform === 'win32' let childProcess: ReturnType | null = null @@ -59,6 +60,7 @@ async function runServe(packageName: string, script: string): Promise { childProcess = spawn('pnpm', ['--filter', packageName, 'run', script], { stdio: 'inherit', cwd: rootDir, + shell: isWindows, }) childProcess.on('close', (code) => {