consistent use of utils.errorMessage

This commit is contained in:
Michael Bradley, Jr 2018-09-27 14:55:44 -05:00 committed by Pascal Precht
parent 545432152f
commit 97f22a3543
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D

View File

@ -33,7 +33,7 @@ class TemplateGenerator {
fs.mkdirpSync(utils.dirname(tmpFilePath));
utils.downloadFile(url, tmpFilePath, (err) => {
if (err) {
console.error(err.red);
console.error(utils.errorMessage(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);
@ -88,7 +88,7 @@ class TemplateGenerator {
console.log(__('Installing packages...').green);
utils.runCmd('npm install', null, (err) => {
if (err) {
return console.error(err.red);
console.error(utils.errorMessage(err).red);
}
console.log(__('Init complete').green);
console.log('\n' + __('App ready at ').green + templatePath);