From 1aaf529400db6d34f3902ebb3df7d3f8ef877ac1 Mon Sep 17 00:00:00 2001 From: Devon Stewart Date: Wed, 13 Nov 2024 16:13:54 -0800 Subject: [PATCH] Hackily adjust Buffer.concat --- src/docker.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/docker.ts b/src/docker.ts index 87794f9..ffb5cb4 100644 --- a/src/docker.ts +++ b/src/docker.ts @@ -215,7 +215,11 @@ function stderrStreamToString(stream: NodeJS.WritableStream): Promise { 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'), + ), + ); }); }