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'), + ), + ); }); }