From 803b3f505061b7326b390f9be6a7afb7aa6f2710 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Tue, 11 Sep 2018 15:22:35 -0500 Subject: [PATCH] should return after callback w/ error --- lib/utils/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils/utils.js b/lib/utils/utils.js index e32cd2f5a..4c0bfe77c 100644 --- a/lib/utils/utils.js +++ b/lib/utils/utils.js @@ -162,6 +162,7 @@ function downloadFile(url, dest, cb) { (url.substring(0, 5) === 'https' ? https : http).get(url, function (response) { if (response.statusCode !== 200) { if (cb) cb(`Download failed, response code ${response.statusCode}`); + return; } response.pipe(file); file.on('finish', function () {