From e9c0aafad91184719f5044606a667e761e287e44 Mon Sep 17 00:00:00 2001 From: Nikita Levyankov Date: Thu, 18 Dec 2025 12:36:30 +0200 Subject: [PATCH] fix: wrap string profile values in arrays for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ternary operators WERE needed after all! Profile values can be: - Arrays: ['dev', 'architect', 'pm'] - Strings: 'all' (special keyword) Downstream code expects arrays: - filterWorkflows() checks selectedWorkflows.includes('all') - filterAgents() checks selectedAgents.includes('all') - separateModifiers() iterates with for-of loop Without wrapping strings in arrays: - 'all' → stays as string → includes() doesn't work - WITH fix: 'all' → becomes ['all'] → includes('all') works ✓ This fixes the profile workflow: 1. Profile defines: workflows: 'all' 2. Parser wraps: normalized.workflows = ['all'] 3. Filter checks: selectedWorkflows.includes('all') → true ✓ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tools/cli/installers/lib/core/options-parser.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/cli/installers/lib/core/options-parser.js b/tools/cli/installers/lib/core/options-parser.js index 2e69ce47..36bb110b 100644 --- a/tools/cli/installers/lib/core/options-parser.js +++ b/tools/cli/installers/lib/core/options-parser.js @@ -127,14 +127,15 @@ function parseOptions(cliOptions) { normalized.profileWorkflows = profile.workflows; // If no explicit modules/agents/workflows, use profile values + // Ensure strings like 'all' are wrapped in arrays for consistency if (!normalized.modules) { - normalized.modules = profile.modules; + normalized.modules = Array.isArray(profile.modules) ? profile.modules : [profile.modules]; } if (!normalized.agents) { - normalized.agents = profile.agents; + normalized.agents = Array.isArray(profile.agents) ? profile.agents : [profile.agents]; } if (!normalized.workflows) { - normalized.workflows = profile.workflows; + normalized.workflows = Array.isArray(profile.workflows) ? profile.workflows : [profile.workflows]; } }