*allow override of configDir

This commit is contained in:
Derrick Hammer 2022-09-21 16:09:34 -04:00
parent 6d0aef8ae2
commit 36a59ce5e6
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,7 @@ switch (os.platform()) {
} }
config.inject({ config.inject({
configDir,
port: 8080, port: 8080,
logLevel: "info", logLevel: "info",
pluginDir: path.join(configDir, "plugins"), pluginDir: path.join(configDir, "plugins"),
@ -38,6 +39,9 @@ config.load({
env: true, env: true,
argv: true, argv: true,
}); });
configDir = config.str("configdir");
if (fs.existsSync(configDir)) { if (fs.existsSync(configDir)) {
try { try {
config.openDir(configDir); config.openDir(configDir);