mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user