File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ export class SyncEmbeddedCompiler {
21
21
/** The buffers emitted by the child process's stderr. */
22
22
readonly stderr$ = new Subject < Buffer > ( ) ;
23
23
24
+ /** Whether the underlying compiler has already exited. */
25
+ private exited = false ;
26
+
24
27
/** Writes `buffer` to the child process's stdin. */
25
28
writeStdin ( buffer : Buffer ) : void {
26
29
this . process . stdin . write ( buffer ) ;
@@ -38,14 +41,15 @@ export class SyncEmbeddedCompiler {
38
41
return true ;
39
42
40
43
case 'exit' :
44
+ this . exited = true ;
41
45
return false ;
42
46
}
43
47
}
44
48
45
49
/** Blocks until the underlying process exits. */
46
50
yieldUntilExit ( ) : void {
47
- while ( this . yield ( ) ) {
48
- // Any events will be handled by ` this.yield()`.
51
+ while ( ! this . exited ) {
52
+ this . yield ( ) ;
49
53
}
50
54
}
51
55
You can’t perform that action at this time.
0 commit comments