File tree 1 file changed +4
-10
lines changed 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -374,25 +374,19 @@ function REPLServer(prompt,
374
374
}
375
375
376
376
promise . then ( ( result ) => {
377
- // Remove prioritized SIGINT listener if it was not called.
378
- // TODO(TimothyGu): Use Promise.prototype.finally when it becomes
379
- // available.
380
- prioritizedSigintQueue . delete ( sigintListener ) ;
381
-
382
377
finishExecution ( undefined , result ) ;
383
- unpause ( ) ;
384
378
} , ( err ) => {
385
- // Remove prioritized SIGINT listener if it was not called.
386
- prioritizedSigintQueue . delete ( sigintListener ) ;
387
-
388
- unpause ( ) ;
389
379
if ( err && process . domain ) {
390
380
debug ( 'not recoverable, send to domain' ) ;
391
381
process . domain . emit ( 'error' , err ) ;
392
382
process . domain . exit ( ) ;
393
383
return ;
394
384
}
395
385
finishExecution ( err ) ;
386
+ } ) . finally ( ( ) => {
387
+ // Remove prioritized SIGINT listener if it was not called.
388
+ prioritizedSigintQueue . delete ( sigintListener ) ;
389
+ unpause ( ) ;
396
390
} ) ;
397
391
}
398
392
}
You can’t perform that action at this time.
0 commit comments