Skip to content

Commit 05b34ac

Browse files
committed
fix port names not showing on OSX El Capitan
1 parent 258d6f2 commit 05b34ac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)