Skip to content

Commit

Permalink
Merge pull request #521 from vliubezny/fix-install
Browse files Browse the repository at this point in the history
Closes #467
  • Loading branch information
aminya authored Nov 15, 2022
2 parents 93dd6c1 + dd42f07 commit 2e827d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ var fs = require("fs");
var url = require("url");

function writeToFile(filename, response, callback) {
response.pipe(fs.createWriteStream(filename));
response.on("end", callback);
var writeStream = fs.createWriteStream(filename);
response.pipe(writeStream);
writeStream.on("finish", callback);
}

function download(fileUrl, filename, callback) {
Expand Down

0 comments on commit 2e827d1

Please sign in to comment.