File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11import { red } from 'ansis' ;
2- import { spawn } from 'child_process' ;
2+ import { spawn , SpawnOptions } from 'child_process' ;
33import * as fs from 'fs' ;
44import { join } from 'path' ;
55import { Input } from '../commands' ;
@@ -218,9 +218,16 @@ export class StartAction extends BuildAction {
218218
219219 processArgs . unshift ( '--enable-source-maps' ) ;
220220
221- return spawn ( binaryToRun , processArgs , {
221+ const spawnOptions : SpawnOptions = {
222222 stdio : 'inherit' ,
223223 shell : options . shell ,
224- } ) ;
224+ } ;
225+
226+ if ( options . shell ) {
227+ const fullCommand = [ binaryToRun , ...processArgs ] . join ( ' ' ) ;
228+ return spawn ( fullCommand , spawnOptions ) ;
229+ }
230+
231+ return spawn ( binaryToRun , processArgs , spawnOptions ) ;
225232 }
226233}
Original file line number Diff line number Diff line change @@ -22,11 +22,8 @@ export class AbstractRunner {
2222 shell : true ,
2323 } ;
2424 return new Promise < null | string > ( ( resolve , reject ) => {
25- const child : ChildProcess = spawn (
26- `${ this . binary } ` ,
27- [ ...this . args , ...args ] ,
28- options ,
29- ) ;
25+ const command = [ this . binary , ...this . args , ...args ] . join ( ' ' ) ;
26+ const child : ChildProcess = spawn ( command , options ) ;
3027 if ( collect ) {
3128 child . stdout ! . on ( 'data' , ( data ) =>
3229 resolve ( data . toString ( ) . replace ( / \r \n | \n / , '' ) ) ,
You can’t perform that action at this time.
0 commit comments