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 (#3313)
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer authored Nov 8, 2022
1 parent d595abf commit ab7840b
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 ab7840b

Please sign in to comment.