diff --git a/src/index.ts b/src/index.ts index 2efeb47e5..e5171a38f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -70,19 +70,16 @@ async function master(): Promise { process.exit(1); } - const res = (t: string, c: string) => - console.log(chalk.bold(`--> ${(chalk as any)[c](t)}\n`)); - switch (state) { case State.failed: - res('Fatal error occurred :(', 'red'); + log('Error', chalk.red('Fatal error occurred :(')); process.exit(); return; case State.warn: - res('Some problem(s) :|', 'yellow'); + log('Warn', chalk.yellow('Some problem(s) :|')); break; case State.success: - res('OK :)', 'green'); + log('Info', chalk.green('OK :)')); break; }