mirror of
https://github.com/Finsys/dockhand.git
synced 2026-06-17 19:09:33 +03:00
Honor DATA_DIR env var in sqlite operations related to hawser connections
This commit is contained in:
committed by
Jarek Krochmalski
parent
bbdb9841fd
commit
241b04247e
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user