Skip to content

Commit 93ed1c2

Browse files
authored
Merge pull request #4502 from NomicFoundation/fix-compiler-downloader
Fix compiler download
2 parents b06601b + abca5ab commit 93ed1c2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/unlucky-pens-melt.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Fixed the compiler download, which broke with the latest version of undici

packages/hardhat-core/src/internal/util/download.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function download(
4848
});
4949

5050
if (response.statusCode >= 200 && response.statusCode <= 299) {
51-
const responseBody = await response.body.arrayBuffer();
51+
const responseBody = Buffer.from(await response.body.arrayBuffer());
5252
const tmpFilePath = resolveTempFileName(filePath);
5353
await fsExtra.ensureDir(path.dirname(filePath));
5454

0 commit comments

Comments
 (0)