@@ -5,10 +5,9 @@ import { __dirname } from '../index';
55import { replaceCommand } from './parse' ;
66
77export const getBunExecutablePath = ( ) : string => {
8- const platform = process . platform ;
98 const arch = process . arch === 'arm64' ? 'aarch64' : process . arch ;
109 const isProduction = app . isPackaged ;
11- const binName = platform === 'win32' ? `bun.exe` : `bun-${ arch } ` ;
10+ const binName = process . platform === 'win32' ? `bun.exe` : `bun-${ arch } ` ;
1211
1312 const bunPath = isProduction
1413 ? path . join ( process . resourcesPath , 'bun' , binName )
@@ -32,8 +31,8 @@ export const runBunCommand = (
3231 command : string ,
3332 options : RunBunCommandOptions ,
3433) : Promise < { stdout : string ; stderr : string } > => {
35- const bunBinary = getBunExecutablePath ( ) ;
36- const commandToExecute = replaceCommand ( command , bunBinary ) ;
34+ const commandToExecute = getBunCommand ( command ) ;
35+ const shell = process . platform === 'win32' ? 'powershell.exe' : 'bash' ;
3736
3837 return new Promise ( ( resolve , reject ) => {
3938 exec (
@@ -44,7 +43,8 @@ export const runBunCommand = (
4443 ...options . env ,
4544 ...process . env ,
4645 } ,
47- maxBuffer : 1024 * 1024 * 10 , // 10MB buffer to handle larger outputs
46+ maxBuffer : 1024 * 1024 * 10 ,
47+ shell,
4848 } ,
4949 ( error : Error | null , stdout : string , stderr : string ) => {
5050 // Call the callbacks with the complete output
0 commit comments