From 45262c639439e46545a8dbaf893ed5d9e143f696 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 24 Mar 2024 21:51:32 -0400 Subject: [PATCH] tweak to registry tool --- tools/registry.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/registry.js b/tools/registry.js index ca74a376..e9690733 100644 --- a/tools/registry.js +++ b/tools/registry.js @@ -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}"`); + } } }