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

Fix binaries being partially downloaded #3313

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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