summaryrefslogtreecommitdiff
path: root/src/lib/config.ts
diff options
context:
space:
mode:
authorRaphael Kabo <raphaelkabo@hey.com>2023-10-07 14:30:24 +0100
committerRaphael Kabo <raphaelkabo@hey.com>2023-10-07 15:38:47 +0100
commitb795d07ed7a1b705b72b171f8e8de267a720223b (patch)
treeb8ae3df8dbb89f839f29328e817f030dc22b89f8 /src/lib/config.ts
parent9341659fd7a791d77454dd33743e42d952dbd202 (diff)
refactor: event form and api routes
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);
}