Skip to content

Commit

Permalink
Merge pull request #4502 from NomicFoundation/fix-compiler-downloader
Browse files Browse the repository at this point in the history
Fix compiler download
  • Loading branch information
fvictorio authored Oct 19, 2023
2 parents b06601b + abca5ab commit 93ed1c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/unlucky-pens-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed the compiler download, which broke with the latest version of undici
2 changes: 1 addition & 1 deletion packages/hardhat-core/src/internal/util/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function download(
});

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

Expand Down

0 comments on commit 93ed1c2

Please sign in to comment.