From a44be3740bc7979e77467a9065201d27747880c0 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Tue, 11 Sep 2018 15:19:15 -0500 Subject: [PATCH] template generator should report err msg and exit if download fails --- lib/utils/template_generator.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/utils/template_generator.js b/lib/utils/template_generator.js index 259144af..0ed45925 100644 --- a/lib/utils/template_generator.js +++ b/lib/utils/template_generator.js @@ -22,7 +22,11 @@ class TemplateGenerator { console.log(__('Installing Template from ' + uri + '....').green); fs.mkdirpSync(utils.dirname(tmpFilePath)); - utils.downloadFile(url, tmpFilePath, () => { + utils.downloadFile(url, tmpFilePath, (err) => { + if (err) { + console.error(err.red); + process.exit(1); + } utils.extractZip(tmpFilePath, fspath, { map: file => { let fixed_path = file.path.split('/');