From eeeea6f2046689c056f96a010adb1c912001fe87 Mon Sep 17 00:00:00 2001 From: Jonah Schulte Date: Tue, 10 Feb 2026 22:03:36 -0500 Subject: [PATCH] fix: add missing sources/selectedFiles to CLI --custom-content config The non-interactive --custom-content CLI flag builds a customContentConfig object missing the `sources`, `selected`, and `selectedFiles` properties that the installer expects. This causes findModuleSource() to fail with "Source for module X is not available" because customModulePaths is never populated. Align both CLI code paths (modify and fresh install flows) with the config shape produced by the interactive promptCustomContentSource() method. Fixes #1623 --- tools/cli/lib/ui.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/cli/lib/ui.js b/tools/cli/lib/ui.js index 224d147e3..4c191b9b2 100644 --- a/tools/cli/lib/ui.js +++ b/tools/cli/lib/ui.js @@ -336,11 +336,15 @@ class UI { } if (customPaths.length > 0) { + const sources = customPaths.map((p, i) => ({ path: p, id: selectedModuleIds[i], name: selectedModuleIds[i] })); customModuleResult = { selectedCustomModules: selectedModuleIds, customContentConfig: { hasCustomContent: true, + selected: true, paths: customPaths, + sources: sources, + selectedFiles: customPaths.map((p) => path.join(p, 'module.yaml')), selectedModuleIds: selectedModuleIds, }, }; @@ -477,9 +481,13 @@ class UI { } if (customPaths.length > 0) { + const sources = customPaths.map((p, i) => ({ path: p, id: selectedModuleIds[i], name: selectedModuleIds[i] })); customContentConfig = { hasCustomContent: true, + selected: true, paths: customPaths, + sources: sources, + selectedFiles: customPaths.map((p) => path.join(p, 'module.yaml')), selectedModuleIds: selectedModuleIds, }; }