From b88845c0fe80d3a18a8aafd1a97aa86f74489107 Mon Sep 17 00:00:00 2001 From: Nikita Levyankov Date: Thu, 18 Dec 2025 12:32:04 +0200 Subject: [PATCH] fix: remove useless ternary operators in options-parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ternary operators were checking `Array.isArray()` but returning the same value in both branches, making them completely pointless. Since profiles can contain both arrays (e.g., `['dev', 'architect']`) and strings (e.g., `'all'`), and both are valid, we should just assign the value directly. Fixed lines: - normalized.modules = profile.modules - normalized.agents = profile.agents - normalized.workflows = profile.workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tools/cli/installers/lib/core/options-parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/cli/installers/lib/core/options-parser.js b/tools/cli/installers/lib/core/options-parser.js index 660c4e6f..2e69ce47 100644 --- a/tools/cli/installers/lib/core/options-parser.js +++ b/tools/cli/installers/lib/core/options-parser.js @@ -128,13 +128,13 @@ function parseOptions(cliOptions) { // If no explicit modules/agents/workflows, use profile values if (!normalized.modules) { - normalized.modules = Array.isArray(profile.modules) ? profile.modules : profile.modules; + normalized.modules = profile.modules; } if (!normalized.agents) { - normalized.agents = Array.isArray(profile.agents) ? profile.agents : profile.agents; + normalized.agents = profile.agents; } if (!normalized.workflows) { - normalized.workflows = Array.isArray(profile.workflows) ? profile.workflows : profile.workflows; + normalized.workflows = profile.workflows; } }