Skip to content

Commit 1e08c1c

Browse files
committed
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 <[email protected]>
1 parent 4e6b095 commit 1e08c1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/types/toolname.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ func PickToolName(toolName string, existing map[string]struct{}) string {
9292
existing[testName] = struct{}{}
9393
return testName
9494
}
95-
toolName += "0"
95+
testName += "0"
9696
}
9797
}

0 commit comments

Comments
 (0)