File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ export function plainExec(
102102 dispose : ( ) => {
103103 if ( ! proc . killed ) {
104104 proc . kill ( ) ;
105+ deferred . reject ( new Error ( 'Process was killed' ) ) ;
105106 }
106107 } ,
107108 } ;
Original file line number Diff line number Diff line change @@ -50,11 +50,17 @@ class DeferredImpl<T> implements Deferred<T> {
5050 }
5151
5252 public resolve ( _value : T | PromiseLike < T > ) {
53+ if ( this . completed ) {
54+ return ;
55+ }
5356 this . _resolve . apply ( this . scope ? this . scope : this , [ _value ] ) ;
5457 this . _resolved = true ;
5558 }
5659
5760 public reject ( _reason ?: string | Error | Record < string , unknown > ) {
61+ if ( this . completed ) {
62+ return ;
63+ }
5864 this . _reject . apply ( this . scope ? this . scope : this , [ _reason ] ) ;
5965 this . _rejected = true ;
6066 }
You can’t perform that action at this time.
0 commit comments