File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -212,10 +212,9 @@ func (c *Tools) Remove(ctx context.Context, payload *tools.ToolPayload) (*tools.
212212
213213func rename (base string ) extract.Renamer {
214214 return func (path string ) string {
215- parts := strings .Split (path , string ( filepath .Separator ) )
216- path = strings .Join (parts [1 :], string ( filepath . Separator ) )
215+ parts := strings .Split (filepath .ToSlash ( path ), "/" )
216+ path = strings .Join (parts [1 :], "/" )
217217 path = filepath .Join (base , path )
218-
219218 return path
220219 }
221220}
@@ -258,8 +257,9 @@ func writeInstalled(folder, path string) error {
258257
259258 parts := strings .Split (path , string (filepath .Separator ))
260259 tool := parts [len (parts )- 2 ]
261-
260+ toolWithVersion := fmt . Sprint ( tool , "-" , parts [ len ( parts ) - 1 ])
262261 installed [tool ] = filepath .Join (folder , path )
262+ installed [toolWithVersion ] = filepath .Join (folder , path )
263263
264264 data , err = json .Marshal (installed )
265265 if err != nil {
You can’t perform that action at this time.
0 commit comments