summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/index.ts b/src/index.ts
index 2efeb47e51..e5171a38f6 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -70,19 +70,16 @@ async function master(): Promise<void> {
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;
}