From 09538099d798c2c0719492a91183289e3a33745c Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Mon, 8 Dec 2025 10:28:11 -0700 Subject: [PATCH] fix: fail fast on malformed custom module YAML User customizations must be valid - silent skip hides broken configs. --- tools/cli/installers/lib/modules/manager.js | 4 ++-- tools/cli/lib/ui.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/cli/installers/lib/modules/manager.js b/tools/cli/installers/lib/modules/manager.js index 3829968b..bd8e538e 100644 --- a/tools/cli/installers/lib/modules/manager.js +++ b/tools/cli/installers/lib/modules/manager.js @@ -391,8 +391,8 @@ class ModuleManager { if (config.code === moduleName) { return modulePath; } - } catch { - // Skip if can't read config + } catch (error) { + throw new Error(`Failed to parse module.yaml at ${configPath}: ${error.message}`); } } } diff --git a/tools/cli/lib/ui.js b/tools/cli/lib/ui.js index 1cc9d9c4..71c2d5aa 100644 --- a/tools/cli/lib/ui.js +++ b/tools/cli/lib/ui.js @@ -636,8 +636,8 @@ class UI { moduleData = yaml.load(yamlContent); foundPath = configPath; break; - } catch { - // Continue to next path + } catch (error) { + throw new Error(`Failed to parse config at ${configPath}: ${error.message}`); } } }