mirror of https://github.com/embarklabs/embark.git
should return after callback w/ error
This commit is contained in:
parent
a44be3740b
commit
803b3f5050
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue