From aa316091e662381b005a403451609dfc6c4bdd47 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 31 Aug 2025 16:41:03 +0300 Subject: [PATCH] chore(dx): fix cannot read properties of undefined if DB dir is missing --- apps/server/src/services/resource_dir.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/server/src/services/resource_dir.ts b/apps/server/src/services/resource_dir.ts index c274b43ce..35c056af2 100644 --- a/apps/server/src/services/resource_dir.ts +++ b/apps/server/src/services/resource_dir.ts @@ -1,4 +1,3 @@ -import log from "./log.js"; import path from "path"; import fs from "fs"; @@ -10,7 +9,7 @@ const ELECTRON_APP_ROOT_DIR = path.resolve(RESOURCE_DIR, "../.."); const DB_INIT_DIR = path.resolve(RESOURCE_DIR, "db"); if (!fs.existsSync(DB_INIT_DIR)) { - log.error(`Could not find DB initialization directory: ${DB_INIT_DIR}`); + console.error(`Could not find DB initialization directory: ${DB_INIT_DIR}`); process.exit(1); }