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