File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -226,14 +226,16 @@ func configFileTemplate(tools []domain.Tool) string {
226226 } else {
227227 // In local mode with no tools specified, use the default tool list from plugins.GetToolVersions()
228228 var sortedTools []string
229+ seen := make (map [string ]bool )
229230 for toolName := range defaultVersions {
230- if defaultVersions [toolName ] != "" {
231+ if defaultVersions [toolName ] != "" && ! seen [ toolName ] {
231232 sortedTools = append (sortedTools , toolName )
233+ seen [toolName ] = true
232234 }
233235 }
234236 sort .Strings (sortedTools )
235237
236- // Write sorted tools
238+ // Write sorted tools ONCE
237239 for _ , toolName := range sortedTools {
238240 version := defaultVersions [toolName ]
239241 sb .WriteString (fmt .Sprintf (" - %s@%s\n " , toolName , version ))
You can’t perform that action at this time.
0 commit comments