Honor DATA_DIR env var in sqlite operations related to hawser connections

This commit is contained in:
Viktoras authored and Jarek Krochmalski committed 2026-01-23 14:29:24 +01:00
1 parent bbdb9841fd
commit 241b04247e
1 file changed
+1 -1
+1 -1
View File
@@ -105,7 +105,7 @@ function _getDb() {
_db = new _SQL(dbUrl);
_isPostgres = true;
} else {
const _dbPath = _join(process.cwd(), 'data', 'db', 'dockhand.db');
const dbPath = process.env.DATA_DIR ? _join(process.env.DATA_DIR, 'db', 'dockhand.db') : _join(process.cwd(), 'data', 'db', 'dockhand.db');
if (_existsSync(_dbPath)) {
_db = new _Database(_dbPath);
}