mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 19:26:12 +08:00
chore(dx): fix cannot read properties of undefined if DB dir is missing
This commit is contained in:
parent
2297721228
commit
aa316091e6
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue