sturcture for init and exit

This commit is contained in:
Michael C
2021-10-22 11:37:32 -04:00
parent a3ea732870
commit 6bcc4cdfa3

View File

@@ -12,6 +12,9 @@ async function init() {
});
await initDb();
// edge case clause for creating compatible .db files, do not enable
if (config.mode === "init-db-and-exit") process.exit(0);
// do not enable init-db-only mode for usage.
(global as any).HEADCOMMIT = config.mode === "development" ? "development"
: config.mode === "test" ? "test"
: getCommit() as string;