Skip to content

Commit

Permalink
Hackily adjust Buffer.concat
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese committed Nov 14, 2024
1 parent ad9d753 commit 1aaf529
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ function stderrStreamToString(stream: NodeJS.WritableStream): Promise<string> {
return new Promise((resolve, reject) => {
stream.on('data', (chunk) => chunks.push(Buffer.from(chunk)));
stream.on('error', (err) => reject(err));
stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')));
stream.on('end', () =>
resolve(
Buffer.concat(chunks.map((x) => Uint8Array.from(x))).toString('utf8'),
),
);
});
}

Expand Down

0 comments on commit 1aaf529

Please sign in to comment.