This commit is contained in:
@@ -23,7 +23,10 @@ export function exitCode(child: ChildProcess): Promise<number> {
|
||||
}
|
||||
|
||||
// Writes a chunk, waiting for the stream to drain when its buffer is full.
|
||||
export async function echo(stream: Writable, chunk: string | Uint8Array): Promise<void> {
|
||||
export async function echo(
|
||||
stream: Writable,
|
||||
chunk: string | Uint8Array,
|
||||
): Promise<void> {
|
||||
if (!stream.write(chunk)) {
|
||||
await once(stream, "drain");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user