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
This commit is contained in:
parent
3e35057b89
commit
eeeea6f204
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue