Skip to content

Commit 17e2075

Browse files
committed
Merge branch 'tools_multiversion' into devel
2 parents 3acc34a + 2e01ff2 commit 17e2075

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-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"}

seriallist_darwin.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ func associateVidPidWithPort(ports []OsSerialPort) []OsSerialPort {
2424
port_hash := strings.Trim(ports[index].Name, "/dev/tty.usbmodem")
2525
port_hash = strings.Trim(port_hash, "/dev/tty.usbserial-")
2626

27+
port_hash = strings.ToLower(port_hash)
28+
2729
usbcmd := exec.Command("system_profiler", "SPUSBDataType")
2830
grepcmd := exec.Command("grep", "Location ID: 0x"+port_hash[:len(port_hash)-1], "-B6")
2931
cmdOutput, _ := pipe_commands(usbcmd, grepcmd)

0 commit comments

Comments
 (0)