File tree 1 file changed +6
-4
lines changed 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as fs from 'node:fs'
4
4
import * as os from 'node:os'
5
5
import * as child_process from 'node:child_process'
6
6
import * as crypto from 'node:crypto'
7
+ import * as readline from 'node:readline'
7
8
8
9
// Globals
9
10
const RUNFILES_ROOT = path . join (
@@ -452,10 +453,11 @@ async function main(args, sandbox) {
452
453
} )
453
454
454
455
// Process stdin data in order using a promise chain.
455
- let syncing = Promise . resolve ( )
456
- process . stdin . on ( 'data' , async ( chunk ) => {
457
- return ( syncing = syncing . then ( ( ) => processChunk ( chunk ) ) )
458
- } )
456
+ let syncing = Promise . resolve ( ) ;
457
+ const rl = readline . createInterface ( { input : process . stdin } ) ;
458
+ rl . on ( 'line' , ( line ) => {
459
+ syncing = syncing . then ( ( ) => processChunk ( line ) ) ;
460
+ } ) ;
459
461
460
462
async function processChunk ( chunk ) {
461
463
try {
You can’t perform that action at this time.
0 commit comments