fix(startup): ignore blank data dir override

Treat empty or whitespace-only dataDirOverride values as unset so
bootstrapEnv keeps using the normal DATA_DIR and .env lookup path.

Adds a focused regression test for the whitespace override case.
This commit is contained in:
Kfir Amar
2026-03-14 21:29:34 +02:00
parent da39e1485f
commit e3a2bd75f3
2 changed files with 12 additions and 1 deletions

View File

@@ -35,7 +35,7 @@ const OPTIONAL_OAUTH_SECRETS = [
// ── Resolve DATA_DIR (mirrors dataPaths.ts logic) ───────────────────────────
function resolveDataDir(overridePath, env = process.env) {
if (overridePath) return resolve(overridePath);
if (overridePath?.trim()) return resolve(overridePath);
const configured = env.DATA_DIR?.trim();
if (configured) return resolve(configured);