fix: handle array-wrapped 'all' value for modules

After wrapping profile string values in arrays in options-parser, the modules handling in ui.js was still only checking for string 'all', not array ['all']. This would break profiles with `modules: 'all'`.

Added checks for both cases:
- String: `options.modules === 'all'` (original case)
- Array: `options.modules.includes('all')` (new case after wrapping)

Now modules handling is consistent with agents/workflows filtering which already used `.includes('all')`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Nikita Levyankov 2025-12-18 12:39:07 +02:00
parent e9c0aafad9
commit 32b104b4bc
1 changed files with 2 additions and 2 deletions

View File

@ -1545,7 +1545,7 @@ class UI {
}
} else if (options.modules) {
// Module-based installation
if (options.modules === 'all') {
if (options.modules === 'all' || (Array.isArray(options.modules) && options.modules.includes('all'))) {
selectedModules = ['bmm', 'bmbb', 'cis', 'bmgd'];
} else if (Array.isArray(options.modules)) {
selectedModules = options.modules.filter((m) => m !== 'core');
@ -1554,7 +1554,7 @@ class UI {
// Profile-based installation
const { getProfile } = require('../installers/lib/profiles/definitions');
const profile = getProfile(options.profile);
if (profile.modules === 'all') {
if (profile.modules === 'all' || (Array.isArray(profile.modules) && profile.modules.includes('all'))) {
selectedModules = ['bmm', 'bmbb', 'cis', 'bmgd'];
} else if (Array.isArray(profile.modules)) {
selectedModules = profile.modules.filter((m) => m !== 'core');