aboutsummaryrefslogtreecommitdiff
path: root/src/ipcMain/index.ts
diff options
context:
space:
mode:
authorKyiro <54126666+Kyiro@users.noreply.github.com>2022-10-16 23:20:43 +0200
committerGitHub <noreply@github.com>2022-10-16 23:20:43 +0200
commitc7c5ffdd4486700c5d670096cbfd64bf23e9167f (patch)
tree5334400ed46017a5c25b4054163a34fe1be64831 /src/ipcMain/index.ts
parent0ccea1645395ec3806b8c2fdcbac66e220035930 (diff)
downloadVencord-c7c5ffdd4486700c5d670096cbfd64bf23e9167f.tar.gz
Vencord-c7c5ffdd4486700c5d670096cbfd64bf23e9167f.tar.bz2
Vencord-c7c5ffdd4486700c5d670096cbfd64bf23e9167f.zip
Allow customising SettingsDir via VENCORD_USER_DATA_DIR environment variable (#106)
Diffstat (limited to 'src/ipcMain/index.ts')
-rw-r--r--src/ipcMain/index.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ipcMain/index.ts b/src/ipcMain/index.ts
index 1f6166e..2db9587 100644
--- a/src/ipcMain/index.ts
+++ b/src/ipcMain/index.ts
@@ -7,7 +7,11 @@ import IpcEvents from "../utils/IpcEvents";
import "./updater";
-const DATA_DIR = join(app.getPath("userData"), "..", "Vencord");
+const DATA_DIR = process.env.VENCORD_USER_DATA_DIR ?? (
+ process.env.DISCORD_USER_DATA_DIR
+ ? join(process.env.DISCORD_USER_DATA_DIR, "..", "VencordData")
+ : join(app.getPath("userData"), "..", "Vencord")
+);
const SETTINGS_DIR = join(DATA_DIR, "settings");
const QUICKCSS_PATH = join(SETTINGS_DIR, "quickCss.css");
const SETTINGS_FILE = join(SETTINGS_DIR, "settings.json");