File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 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'
44import * as os from 'node:os'
55import * as child_process from 'node:child_process'
66import * as crypto from 'node:crypto'
7+ import * as readline from 'node:readline'
78
89// Globals
910const RUNFILES_ROOT = path . join (
@@ -452,10 +453,11 @@ async function main(args, sandbox) {
452453 } )
453454
454455 // 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+ } ) ;
459461
460462 async function processChunk ( chunk ) {
461463 try {
You can’t perform that action at this time.
0 commit comments