From a4ceab217d9419e6a5d018fbf7b8b8c59908a67c Mon Sep 17 00:00:00 2001 From: Nicola Krumschmidt Date: Sun, 6 Dec 2020 23:07:52 +0100 Subject: [PATCH] Improve cli init error message --- api/src/cli/commands/init/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/cli/commands/init/index.ts b/api/src/cli/commands/init/index.ts index 883ce402db..f5a4dbc2d4 100644 --- a/api/src/cli/commands/init/index.ts +++ b/api/src/cli/commands/init/index.ts @@ -53,7 +53,7 @@ export default async function init(options: Record) { 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();