Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 3967d79

Browse files
Plamen5kovPanayotCankov
authored andcommitted
fix(snapshot): use autoclose option on writestream (#345)
1 parent 273dbd5 commit 3967d79

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: snapshot/android/utils.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ const downloadFile = (url, destinationFilePath) =>
1515
const request = httpsGet(url, response => {
1616
switch (response.statusCode) {
1717
case 200:
18-
const file = createWriteStream(destinationFilePath);
18+
const file = createWriteStream(destinationFilePath, {autoClose: true});
1919
file.on('error', function (error) {
2020
return reject(error);
2121
});
2222
file.on("finish", function() {
23-
file.close();
2423
chmodSync(destinationFilePath, 0755);
2524
return resolve(destinationFilePath);
2625
});

0 commit comments

Comments
 (0)