tweak to registry tool

This commit is contained in:
Brahim Hadriche committed 2024-03-24 21:51:32 -04:00
1 parent 7ce3b2636c
commit 45262c6394
1 file changed
+5 -3
+5 -3
View File
@@ -64,9 +64,11 @@ const getEnvVars = require('./get-env-vars');
for (const section in registry) {
for (const key in registry[section]) {
// We expect all values to be JSON strings.
// If this changes, we let JSON.parse throw an error.
registry[section][key] = JSON.parse(registry[section][key]);
try {
registry[section][key] = JSON.parse(registry[section][key]);
} catch (error) {
console.error(`Failed to parse value for key "${key}" in section "${section}"`);
}
}
}