mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
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);
|
console.log(__('Installing Template from ' + uri + '....').green);
|
||||||
|
|
||||||
fs.mkdirpSync(utils.dirname(tmpFilePath));
|
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, {
|
utils.extractZip(tmpFilePath, fspath, {
|
||||||
map: file => {
|
map: file => {
|
||||||
let fixed_path = file.path.split('/');
|
let fixed_path = file.path.split('/');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user