diff options
author | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-07 14:30:24 +0100 |
---|---|---|
committer | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-07 15:38:47 +0100 |
commit | b795d07ed7a1b705b72b171f8e8de267a720223b (patch) | |
tree | b8ae3df8dbb89f839f29328e817f030dc22b89f8 /src/lib/config.ts | |
parent | 9341659fd7a791d77454dd33743e42d952dbd202 (diff) |
refactor: event form and api routes
Diffstat (limited to 'src/lib/config.ts')
-rw-r--r-- | src/lib/config.ts | 5 |
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); } |