@@ -16,10 +16,10 @@ export class Runnable {
16
16
private _timedOut = false ;
17
17
private _exitCode : number | null = null ;
18
18
19
- run ( command : string , timeout : number , cwd ?: string , ...args : string [ ] ) {
19
+ run ( command : string , timeout ? : number , cwd ?: string , ...args : string [ ] ) {
20
20
// FIXME: Simplify TL to check a flag once https://github.com/nodejs/node/pull/51608 lands
21
21
22
- const timeoutSignal = AbortSignal . timeout ( timeout ) ;
22
+ const timeoutSignal = timeout ? AbortSignal . timeout ( timeout ) : undefined ;
23
23
this . _process = child_process . spawn ( command , args , {
24
24
cwd,
25
25
signal : timeoutSignal ,
@@ -37,7 +37,7 @@ export class Runnable {
37
37
this . _endTime = performance . now ( ) ;
38
38
this . _signal = signal ;
39
39
this . _exitCode = code ;
40
- this . _timedOut = timeoutSignal . aborted ;
40
+ this . _timedOut = timeoutSignal ? .aborted ?? false ;
41
41
resolve ( ) ;
42
42
} ) ;
43
43
} ) ;
@@ -115,7 +115,12 @@ export async function compile(
115
115
context . subscriptions . push ( compilationStatusItem ) ;
116
116
117
117
const process = new Runnable ( ) ;
118
- process . run ( resolvedArgs [ 0 ] , 0 , undefined , ...resolvedArgs . slice ( 1 ) ) ;
118
+ process . run (
119
+ resolvedArgs [ 0 ] ,
120
+ undefined ,
121
+ undefined ,
122
+ ...resolvedArgs . slice ( 1 ) ,
123
+ ) ;
119
124
120
125
let err = '' ;
121
126
process . process ?. stderr . on ( 'data' , ( data : string ) => {
0 commit comments