forwarding: fix formatting issues in the log (#191814)

Fixes #191759
This commit is contained in:
Connor Peet 2023-08-30 09:50:50 -07:00 committed by GitHub
parent 29137c69f1
commit cd7388f4da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,8 @@ export const splitNewLines = () => new StreamSplitter('\n'.charCodeAt(0));
/**
* Copied and simplified from src\vs\base\node\nodeStreams.ts
*
* Exception: does not include the split character in the output.
*/
export class StreamSplitter extends Transform {
private buffer: Buffer | undefined;
@ -31,7 +33,7 @@ export class StreamSplitter extends Transform {
break;
}
this.push(this.buffer.subarray(offset, index + 1));
this.push(this.buffer.subarray(offset, index));
offset = index + 1;
}