@@ -121,9 +121,9 @@ func collectAllToolsFolders(from string) ([]string, error) {
121
121
return folders , i18n .WrapError (err )
122
122
}
123
123
124
- func toolsSliceContains (tools * []* types.Tool , name , version string ) bool {
124
+ func toolsSliceContains (tools * []* types.Tool , name , version string , vendor string ) bool {
125
125
for _ , tool := range * tools {
126
- if name == tool .Name && version == tool .Version {
126
+ if name == tool .Name && version == tool .Version && vendor == tool . Vendor {
127
127
return true
128
128
}
129
129
}
@@ -148,7 +148,7 @@ func loadToolsFrom(tools *[]*types.Tool, builtinToolsVersionsFilePath string) er
148
148
toolName := strings .Split (rowParts [0 ], "." )[1 ]
149
149
toolVendor := strings .Split (rowParts [0 ], "." )[0 ]
150
150
toolVersion := rowParts [1 ]
151
- if ! toolsSliceContains (tools , toolName , toolVersion ) {
151
+ if ! toolsSliceContains (tools , toolName , toolVersion , toolVendor ) {
152
152
* tools = append (* tools , & types.Tool {Name : toolName , Vendor : toolVendor , Version : toolVersion , Folder : folder })
153
153
}
154
154
}
@@ -192,7 +192,7 @@ func loadToolsFromFolderStructure(tools *[]*types.Tool, folder string) error {
192
192
return i18n .WrapError (err )
193
193
}
194
194
toolVendor := filepath .Base (strings .Replace (folder , filepath .Base (folder ), "" , - 1 ))
195
- if ! toolsSliceContains (tools , toolName .Name (), toolVersion .Name ()) {
195
+ if ! toolsSliceContains (tools , toolName .Name (), toolVersion .Name (), toolVendor ) {
196
196
* tools = append (* tools , & types.Tool {Name : toolName .Name (), Vendor : toolVendor , Version : toolVersion .Name (), Folder : toolFolder })
197
197
}
198
198
}
0 commit comments