@@ -111,9 +111,9 @@ func collectAllToolsFolders(from string) ([]string, error) {
111
111
return folders , i18n .WrapError (err )
112
112
}
113
113
114
- func toolsSliceContains (tools * []* types.Tool , name , version string ) bool {
114
+ func toolsSliceContains (tools * []* types.Tool , name , version string , vendor string ) bool {
115
115
for _ , tool := range * tools {
116
- if name == tool .Name && version == tool .Version {
116
+ if name == tool .Name && version == tool .Version && vendor == tool . Vendor {
117
117
return true
118
118
}
119
119
}
@@ -138,7 +138,7 @@ func loadToolsFrom(tools *[]*types.Tool, builtinToolsVersionsFilePath string) er
138
138
toolName := strings .Split (rowParts [0 ], "." )[1 ]
139
139
toolVendor := strings .Split (rowParts [0 ], "." )[0 ]
140
140
toolVersion := rowParts [1 ]
141
- if ! toolsSliceContains (tools , toolName , toolVersion ) {
141
+ if ! toolsSliceContains (tools , toolName , toolVersion , toolVendor ) {
142
142
* tools = append (* tools , & types.Tool {Name : toolName , Vendor : toolVendor , Version : toolVersion , Folder : folder })
143
143
}
144
144
}
@@ -182,7 +182,7 @@ func loadToolsFromFolderStructure(tools *[]*types.Tool, folder string) error {
182
182
return i18n .WrapError (err )
183
183
}
184
184
toolVendor := filepath .Base (strings .Replace (folder , filepath .Base (folder ), "" , - 1 ))
185
- if ! toolsSliceContains (tools , toolName .Name (), toolVersion .Name ()) {
185
+ if ! toolsSliceContains (tools , toolName .Name (), toolVersion .Name (), toolVendor ) {
186
186
* tools = append (* tools , & types.Tool {Name : toolName .Name (), Vendor : toolVendor , Version : toolVersion .Name (), Folder : toolFolder })
187
187
}
188
188
}
0 commit comments