mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 21:32:55 +01:00
Fix update-config script to parse string values
This commit is contained in:
parent
e2b0a286a4
commit
3e8d646edd
@ -5,7 +5,7 @@ const GENERATED_CONFIG_FILE_NAME = 'generated-config.js';
|
||||
|
||||
let settings = [];
|
||||
let configContent = {};
|
||||
const packageSettings = ['GIT_COMMIT_HASH', 'PACKAGE_JSON_VERSION']; //These will be handled by generate-config
|
||||
const packageSettings = ['GIT_COMMIT_HASH', 'PACKAGE_JSON_VERSION']; //These will be handled by generate-config
|
||||
|
||||
var args = process.argv.slice(2);
|
||||
|
||||
@ -19,8 +19,10 @@ function addSetting(key, value) {
|
||||
function normalizedValue(value) {
|
||||
if (Number(value)) {
|
||||
value = Number(value);
|
||||
} else if ((value === 'true') || (value !== 'true')) {
|
||||
} else if ((value === 'true') || (value === 'false')) {
|
||||
value = !!JSON.parse(String(value).toLowerCase());
|
||||
} else {
|
||||
value = String(value).toLowerCase();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user