Skip to content

Commit 8dfdb10

Browse files
committed
fix: update command execution for cross-platform compatibility
- Modified the command execution in `build-package.ts` to use `cmd.exe` on Windows and `pnpm` on other platforms, ensuring proper invocation of the build process. - Adjusted arguments for the spawn function to accommodate the changes in command structure, enhancing compatibility across different operating systems.
1 parent a8e1af7 commit 8dfdb10

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/build-package.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ async function buildBundler(): Promise<void> {
3535

3636
return new Promise((resolve, reject) => {
3737
const isWindows = process.platform === 'win32';
38-
const child = spawn(isWindows ? 'pnpm.cmd' : 'pnpm', ['build'], {
38+
const cmd = isWindows ? 'cmd.exe' : 'pnpm';
39+
const args = isWindows ? ['/c', 'pnpm', 'build'] : ['build'];
40+
const child = spawn(cmd, args, {
3941
cwd: BUNDLER_PATH,
4042
stdio: 'inherit',
4143
shell: false,

0 commit comments

Comments
 (0)