Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Fix binaries being partially downloaded
Browse files Browse the repository at this point in the history
Regressed in #3193

Fixes #3300
  • Loading branch information
xzyfer committed Nov 8, 2022
1 parent d595abf commit 1823b58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ function download(url, dest, cb) {

try {
fetch(url, downloadOptions()).then(function (response) {
fs.createWriteStream(dest).on('error', cb).end(response.data, cb);
return response.buffer();
}).then(function (buffer) {
fs.createWriteStream(dest).on('error', cb).end(buffer, cb);
console.log('Download complete');
}).catch(function(err) {
if(!successful(err)) {
Expand Down

0 comments on commit 1823b58

Please # to comment.