mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-09-04 01:00:51 +03:00
fix(installer): deduplicate repeated tool selections (#777)
Signed-off-by: Mr-Neutr0n <harikp2002@gmail.com>
This commit is contained in:
+9
-1
@@ -1247,7 +1247,15 @@ main() {
|
|||||||
local valid=false _vt
|
local valid=false _vt
|
||||||
for _vt in "${ALL_TOOLS[@]}"; do [[ "$_vt" == "$_t" ]] && valid=true && break; done
|
for _vt in "${ALL_TOOLS[@]}"; do [[ "$_vt" == "$_t" ]] && valid=true && break; done
|
||||||
$valid || { err "Unknown tool '$_t'. Valid: ${ALL_TOOLS[*]}"; exit 1; }
|
$valid || { err "Unknown tool '$_t'. Valid: ${ALL_TOOLS[*]}"; exit 1; }
|
||||||
_cleaned+=("$_t")
|
# A repeated --tool value would otherwise launch duplicate workers in
|
||||||
|
# --parallel mode and make the reported install count misleading.
|
||||||
|
local duplicate=false _selected
|
||||||
|
if [[ ${#_cleaned[@]} -gt 0 ]]; then
|
||||||
|
for _selected in "${_cleaned[@]}"; do
|
||||||
|
[[ "$_selected" == "$_t" ]] && { duplicate=true; break; }
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
$duplicate || _cleaned+=("$_t")
|
||||||
done
|
done
|
||||||
_tool_list=("${_cleaned[@]}")
|
_tool_list=("${_cleaned[@]}")
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user