Improve cli init error message

This commit is contained in:
Nicola Krumschmidt
2020-12-06 23:07:52 +01:00
parent 6eef331b3c
commit a4ceab217d

View File

@@ -53,7 +53,7 @@ export default async function init(options: Record<string, any>) {
console.log();
console.log('Something went wrong while seeding the database:');
console.log();
console.log(`${err.code && chalk.red(`[${err.code}]`)} ${err.message}`);
console.log(`${chalk.red(`[${err.code || 'Error'}]`)} ${err.message}`);
console.log();
console.log('Please try again');
console.log();