[Antergos and Manjaro support] [Download latest detect_linux.sh if bundled script returns unknown] [Display error message if OS is detected as unknown]

This commit is contained in:
2019-07-28 21:12:40 -05:00
parent ba14f36d32
commit f996bb4a74
7 changed files with 67 additions and 21 deletions

View File

@@ -140,7 +140,9 @@ module.exports.downloadFile = (url, destination, progressCallback, completeCallb
response.data.on('data', (chunk) => {
stream.write(Buffer.from(chunk));
downloaded += chunk.length;
progressCallback((downloaded / total * 100.0).toFixed(2));
if (progressCallback) {
progressCallback((downloaded / total * 100.0).toFixed(2));
}
});
response.data.on('end', () => {