mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
chore(dx): fix cannot read properties of undefined if DB dir is missing
This commit is contained in:
parent
2297721228
commit
aa316091e6
@ -1,4 +1,3 @@
|
|||||||
import log from "./log.js";
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
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");
|
const DB_INIT_DIR = path.resolve(RESOURCE_DIR, "db");
|
||||||
|
|
||||||
if (!fs.existsSync(DB_INIT_DIR)) {
|
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);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user