*allow override of configDir
This commit is contained in:
parent
6d0aef8ae2
commit
36a59ce5e6
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue