tweak to registry tool
This commit is contained in:
1 parent
7ce3b2636c
commit
45262c6394
1 file changed
+4
-2
+4
-2
@@ -64,9 +64,11 @@ const getEnvVars = require('./get-env-vars');
|
|||||||
|
|
||||||
for (const section in registry) {
|
for (const section in registry) {
|
||||||
for (const key in registry[section]) {
|
for (const key in registry[section]) {
|
||||||
// We expect all values to be JSON strings.
|
try {
|
||||||
// If this changes, we let JSON.parse throw an error.
|
|
||||||
registry[section][key] = JSON.parse(registry[section][key]);
|
registry[section][key] = JSON.parse(registry[section][key]);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`Failed to parse value for key "${key}" in section "${section}"`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user