mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
feat: allow custom user data directory via DATA_DIR environment variable
This commit is contained in:
@@ -66,6 +66,8 @@ function getAppName() {
|
||||
function getUserDataDir() {
|
||||
if (isCloud) return "/tmp";
|
||||
|
||||
if (process.env.DATA_DIR) return process.env.DATA_DIR;
|
||||
|
||||
try {
|
||||
const platform = process.platform;
|
||||
const homeDir = os.homedir();
|
||||
|
||||
Reference in New Issue
Block a user