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(
102
102
dispose : ( ) => {
103
103
if ( ! proc . killed ) {
104
104
proc . kill ( ) ;
105
+ deferred . reject ( new Error ( 'Process was killed' ) ) ;
105
106
}
106
107
} ,
107
108
} ;
Original file line number Diff line number Diff line change @@ -50,11 +50,17 @@ class DeferredImpl<T> implements Deferred<T> {
50
50
}
51
51
52
52
public resolve ( _value : T | PromiseLike < T > ) {
53
+ if ( this . completed ) {
54
+ return ;
55
+ }
53
56
this . _resolve . apply ( this . scope ? this . scope : this , [ _value ] ) ;
54
57
this . _resolved = true ;
55
58
}
56
59
57
60
public reject ( _reason ?: string | Error | Record < string , unknown > ) {
61
+ if ( this . completed ) {
62
+ return ;
63
+ }
58
64
this . _reject . apply ( this . scope ? this . scope : this , [ _reason ] ) ;
59
65
this . _rejected = true ;
60
66
}
You can’t perform that action at this time.
0 commit comments