mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-16 13:30:23 +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) => {
|
||||
const value = nconf.get(prop);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user