From 9572c66428bbc8ef475d339b2386eacd8bf540c5 Mon Sep 17 00:00:00 2001 From: hari Date: Wed, 26 Aug 2026 19:20:52 +0530 Subject: [PATCH] fix(installer): deduplicate repeated tool selections (#777) Signed-off-by: Mr-Neutr0n --- scripts/install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index a3c13dc6..dfb0d43a 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1247,7 +1247,15 @@ main() { 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") + # 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 _tool_list=("${_cleaned[@]}") fi