From b5b188fd539367c933e35d99712bda07d8b5bcf3 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 23 Dec 2021 15:20:22 -0500 Subject: [PATCH] feat: allow isCluster, isPrimary, and jobsDisabled to be passed in as numbers in addition to string/bool /cc @barisusakli --- src/prestart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prestart.js b/src/prestart.js index 8f89336b9a..6b1d1dfcc4 100644 --- a/src/prestart.js +++ b/src/prestart.js @@ -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;