template generator should report err msg and exit if download fails
This commit is contained in:
parent
ed48599aa9
commit
a44be3740b
|
@ -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('/');
|
||||
|
|
Loading…
Reference in New Issue