diff --git a/lib/common.ts b/lib/common.ts index a1f67adf54a..485d008607f 100644 --- a/lib/common.ts +++ b/lib/common.ts @@ -438,7 +438,7 @@ export function createChannel(streamIn: StreamIn): StreamOut { offset += length; } if (offset > 0) { - stdout.set(stdout.slice(offset)); + stdout.copyWithin(0, offset, stdoutUsed); stdoutUsed -= offset; } };