provide helpful messages when template download fails

This commit is contained in:
Michael Bradley, Jr 2018-09-11 15:44:54 -05:00
parent a4af0d8f5b
commit a9865eedc5
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,8 @@ class TemplateGenerator {
utils.downloadFile(url, tmpFilePath, (err) => { utils.downloadFile(url, tmpFilePath, (err) => {
if (err) { if (err) {
console.error(err.red); console.error(err.red);
console.error('Does the template really exist?'.red);
console.error(`Embark's supported templates: https://embark.status.im/templates/`.green);
process.exit(1); process.exit(1);
} }
utils.extractZip(tmpFilePath, fspath, { utils.extractZip(tmpFilePath, fspath, {