Commit a79fec1
committed
fix(bash): drain output fiber before scope closes to prevent data loss
Fast-exiting commands (e.g. echo test) could produce (no output)
because Effect.forkScoped interrupted the stream consumer fiber
before it had a chance to process chunks buffered in the Node.js
readable pipe.
Fix by joining the fiber after the exit/abort/timeout race so all
buffered stdout/stderr is flushed into the accumulator list before
Effect.scoped disposes the scope.1 parent c082a13 commit a79fec1
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
520 | 525 | | |
521 | 526 | | |
522 | 527 | | |
| |||
0 commit comments