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

Commit ab7840b

Browse files
authored
Fix binaries being partially downloaded (#3313)
1 parent d595abf commit ab7840b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/install.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ function download(url, dest, cb) {
3737

3838
try {
3939
fetch(url, downloadOptions()).then(function (response) {
40-
fs.createWriteStream(dest).on('error', cb).end(response.data, cb);
40+
return response.buffer();
41+
}).then(function (buffer) {
42+
fs.createWriteStream(dest).on('error', cb).end(buffer, cb);
4143
console.log('Download complete');
4244
}).catch(function(err) {
4345
if(!successful(err)) {

0 commit comments

Comments
 (0)