mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-19 23:10:21 +01:00
feat: allow isCluster, isPrimary, and jobsDisabled to be passed in as numbers in addition to string/bool
/cc @barisusakli
This commit is contained in:
@@ -65,7 +65,7 @@ function loadConfig(configFile) {
|
|||||||
castAsBool.forEach((prop) => {
|
castAsBool.forEach((prop) => {
|
||||||
const value = nconf.get(prop);
|
const value = nconf.get(prop);
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
nconf.set(prop, typeof value === 'boolean' ? value : String(value).toLowerCase() === 'true');
|
nconf.set(prop, ['1', 1, 'true', true].includes(value));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
nconf.stores.env.readOnly = true;
|
nconf.stores.env.readOnly = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user