mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 11:56:00 +00:00
#246 omit sngle-database dbs in ctrl+p seach
This commit is contained in:
@@ -20,8 +20,18 @@ const ensureDirectory = (dir, clean) => {
|
||||
}
|
||||
};
|
||||
|
||||
function datadirCore() {
|
||||
if (process.env.WORKSPACE_DIR) {
|
||||
return process.env.WORKSPACE_DIR;
|
||||
}
|
||||
if (processArgs.workspaceDir) {
|
||||
return processArgs.workspaceDir;
|
||||
}
|
||||
return path.join(os.homedir(), 'dbgate-data');
|
||||
}
|
||||
|
||||
function datadir() {
|
||||
const dir = path.join(os.homedir(), 'dbgate-data');
|
||||
const dir = datadirCore();
|
||||
ensureDirectory(dir);
|
||||
|
||||
return dir;
|
||||
|
||||
Reference in New Issue
Block a user