summaryrefslogtreecommitdiff
path: root/src/lib/config.ts
diff options
context:
space:
mode:
authorRaphael <mail@raphaelkabo.com>2023-10-08 19:26:04 +0100
committerGitHub <noreply@github.com>2023-10-08 19:26:04 +0100
commit44e150bc7f8391b56b78a0697dbd128a8bf8be7b (patch)
treeef065e69228453d5d49b886157a4a88ed3540474 /src/lib/config.ts
parent9ef8e220b4fb582d620016d293b340a63ec97cff (diff)
parent608532d24d868d939fd2cef6302d8d5089a81ee4 (diff)
Merge pull request #112 from lowercasename/rk/typescript
Typescript migration
Diffstat (limited to 'src/lib/config.ts')
-rw-r--r--src/lib/config.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/config.ts b/src/lib/config.ts
index 9577fd6..7b35b98 100644
--- a/src/lib/config.ts
+++ b/src/lib/config.ts
@@ -1,5 +1,6 @@
import fs from "fs";
import toml from "toml";
+import { exitWithError } from "./process.js";
interface GathioConfig {
general: {
@@ -46,8 +47,8 @@ export const getConfig = (): GathioConfig => {
) as GathioConfig;
return config;
} catch {
- console.error(
- "\x1b[31mConfiguration file not found! Have you renamed './config/config-example.toml' to './config/config.toml'?",
+ exitWithError(
+ "Configuration file not found! Have you renamed './config/config-example.toml' to './config/config.toml'?",
);
return process.exit(1);
}