@@ -95,55 +95,56 @@ async function startDev() {
9595 let shellArgs : string [ ] ;
9696 if ( serverOnly ) {
9797 // Only start server and workers (for test sandboxes)
98- if ( isWindows ) {
99- const serverCmd = `cd server && set SERVER_PORT=${ SERVER_PORT } && bun start` ;
100- const workersCmd = `cd server && bun workers ` ;
101- shellArgs = [
102- "cmd" ,
103- "/c" ,
104- `bunx concurrently -n server,workers -c green,yellow " ${ serverCmd } " " ${ workersCmd } "` ,
105- ] ;
106- } else {
107- shellArgs = [
108- "sh ",
109- "-c ",
110- `bunx concurrently -n server,workers -c green,yellow "cd server && SERVER_PORT= ${ SERVER_PORT } bun start" "cd server && bun workers"` ,
111- ] ;
112- }
98+ const serverCmd = isWindows
99+ ? `cd server && set SERVER_PORT=${ SERVER_PORT } && bun start`
100+ : `cd server && SERVER_PORT= ${ SERVER_PORT } bun start ` ;
101+ const workersCmd = `cd server && bun workers` ;
102+ shellArgs = [
103+ process . execPath ,
104+ "x" ,
105+ "concurrently" ,
106+ "-n" ,
107+ "server,workers" ,
108+ "-c ",
109+ "green,yellow ",
110+ serverCmd ,
111+ workersCmd ,
112+ ] ;
113113 } else {
114114 const names = [ "server" ] ;
115115 const colors = [ "green" ] ;
116116 const cmds = [
117117 isWindows
118- ? `" cd server && set SERVER_PORT=${ SERVER_PORT } && bun dev" `
119- : `" cd server && SERVER_PORT=${ SERVER_PORT } bun dev" ` ,
118+ ? `cd server && set SERVER_PORT=${ SERVER_PORT } && bun dev`
119+ : `cd server && SERVER_PORT=${ SERVER_PORT } bun dev` ,
120120 ] ;
121121
122122 if ( ! skipWorkers ) {
123123 names . push ( "workers" ) ;
124124 colors . push ( "yellow" ) ;
125- cmds . push (
126- isWindows
127- ? `"cd server && bun workers:dev"`
128- : `"cd server && bun workers:dev"` ,
129- ) ;
125+ cmds . push ( `cd server && bun workers:dev` ) ;
130126 }
131127
132128 names . push ( "vite" , "checkout" ) ;
133129 colors . push ( "blue" , "magenta" ) ;
134130 cmds . push (
135131 isWindows
136- ? `" cd vite && set VITE_PORT=${ VITE_PORT } && bun dev" `
137- : `" cd vite && VITE_PORT=${ VITE_PORT } bun dev" ` ,
132+ ? `cd vite && set VITE_PORT=${ VITE_PORT } && bun dev`
133+ : `cd vite && VITE_PORT=${ VITE_PORT } bun dev` ,
138134 isWindows
139- ? `" cd apps/checkout && set VITE_PORT=${ CHECKOUT_PORT } && bun dev" `
140- : `" cd apps/checkout && VITE_PORT=${ CHECKOUT_PORT } bun dev" ` ,
135+ ? `cd apps/checkout && set VITE_PORT=${ CHECKOUT_PORT } && bun dev`
136+ : `cd apps/checkout && VITE_PORT=${ CHECKOUT_PORT } bun dev` ,
141137 ) ;
142138
143139 shellArgs = [
144- isWindows ? "cmd" : "sh" ,
145- isWindows ? "/c" : "-c" ,
146- `bunx concurrently -n ${ names . join ( "," ) } -c ${ colors . join ( "," ) } ${ cmds . join ( " " ) } ` ,
140+ process . execPath ,
141+ "x" ,
142+ "concurrently" ,
143+ "-n" ,
144+ names . join ( "," ) ,
145+ "-c" ,
146+ colors . join ( "," ) ,
147+ ...cmds ,
147148 ] ;
148149 }
149150
0 commit comments