From 1e08c1c2149112ac06d6605d471477955b45a3d0 Mon Sep 17 00:00:00 2001 From: Bill Maxwell Date: Fri, 7 Jun 2024 10:09:40 -0700 Subject: [PATCH] fix: infinite loop creating toolset based on name The tool names have to be unique, so if two tools are added with the same name, they have a 0 appended to them. In this case we got into an infinite loop because toolName was incremented not the variable under test. So we ended up in an infite loop. Signed-off-by: Bill Maxwell --- pkg/types/toolname.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/toolname.go b/pkg/types/toolname.go index 4d794c37..622e9bb5 100644 --- a/pkg/types/toolname.go +++ b/pkg/types/toolname.go @@ -92,6 +92,6 @@ func PickToolName(toolName string, existing map[string]struct{}) string { existing[testName] = struct{}{} return testName } - toolName += "0" + testName += "0" } }