mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-07-26 22:51:00 +03:00
fix(install): honor comma-separated --tool list (as the help documents) (#678)
The help text advertised `--tool <a,b>` (a comma list), but --tool took a single value and validated it whole, so `--tool claude-code,cursor` failed with "Unknown tool 'claude-code,cursor'". --division and --agent already split on commas; --tool didn't (#671). Split --tool on commas, trim each entry, and validate each against ALL_TOOLS (mirrors --division), so a bad entry still errors clearly by name. Single-tool use is unchanged. Verified: --tool claude-code,cursor installs both; "claude-code, cursor" (with spaces) works; --tool claude-code,nope errors on 'nope'; --tool cursor still works. Fixes #671 Claude-Session: https://claude.ai/code/session_01WKnDRWM4izsB8WAXKszhsq Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1b31b7a670
commit
3293712e41
+15
-8
@@ -1183,14 +1183,21 @@ main() {
|
|||||||
|
|
||||||
check_integrations
|
check_integrations
|
||||||
|
|
||||||
# Validate explicit tool
|
# Validate explicit tool(s). --tool accepts a comma-separated list (like
|
||||||
|
# --division / --agent), e.g. --tool claude-code,cursor.
|
||||||
|
local _tool_list=()
|
||||||
if [[ "$tool" != "all" ]]; then
|
if [[ "$tool" != "all" ]]; then
|
||||||
local valid=false t
|
local _t
|
||||||
for t in "${ALL_TOOLS[@]}"; do [[ "$t" == "$tool" ]] && valid=true && break; done
|
IFS=',' read -ra _tool_list <<< "$tool"
|
||||||
if ! $valid; then
|
local _cleaned=()
|
||||||
err "Unknown tool '$tool'. Valid: ${ALL_TOOLS[*]}"
|
for _t in "${_tool_list[@]}"; do
|
||||||
exit 1
|
_t="$(printf '%s' "$_t" | xargs)"; [[ -z "$_t" ]] && continue
|
||||||
fi
|
local valid=false _vt
|
||||||
|
for _vt in "${ALL_TOOLS[@]}"; do [[ "$_vt" == "$_t" ]] && valid=true && break; done
|
||||||
|
$valid || { err "Unknown tool '$_t'. Valid: ${ALL_TOOLS[*]}"; exit 1; }
|
||||||
|
_cleaned+=("$_t")
|
||||||
|
done
|
||||||
|
_tool_list=("${_cleaned[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Decide whether to show interactive UI
|
# Decide whether to show interactive UI
|
||||||
@@ -1207,7 +1214,7 @@ main() {
|
|||||||
: # wizard committed SELECTED_TOOLS + FILTER_DIVISIONS
|
: # wizard committed SELECTED_TOOLS + FILTER_DIVISIONS
|
||||||
|
|
||||||
elif [[ "$tool" != "all" ]]; then
|
elif [[ "$tool" != "all" ]]; then
|
||||||
SELECTED_TOOLS=("$tool")
|
SELECTED_TOOLS=("${_tool_list[@]}")
|
||||||
|
|
||||||
else
|
else
|
||||||
# Non-interactive (or no TTY): auto-detect
|
# Non-interactive (or no TTY): auto-detect
|
||||||
|
|||||||
Reference in New Issue
Block a user