Skip to content

Commit a23dbee

Browse files
committed
use different strategy for tools with multiple versions
1 parent 5ee33e2 commit a23dbee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

download.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ func spDownloadTool(name string, url string) {
110110
log.Info("Tool already present, skipping download")
111111
}
112112

113-
// will be something like ${tempfolder}/avrdude/bin/avrdude
114-
globalToolsMap["{runtime.tools."+name+".path}"] = filepath.ToSlash(tempToolsPath + "/" + name)
113+
folders, _ := ioutil.ReadDir(tempToolsPath)
114+
for _, f := range folders {
115+
globalToolsMap["{runtime.tools."+f.Name()+".path}"] = filepath.ToSlash(tempToolsPath + "/" + f.Name())
116+
}
115117

116118
log.Info("Map Updated")
117119
mapD := map[string]string{"DownloadStatus": "Success", "Msg": "Map Updated"}

0 commit comments

Comments
 (0)