Skip to content

Commit d7ec9dd

Browse files
ysoldakdeadprogram
authored andcommitted
Discover USB ports only
This will ignore f.ex. bluetooth
1 parent e7c6bd3 commit d7ec9dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,9 @@ func getDefaultPort(portCandidates []string) (port string, err error) {
714714
}
715715

716716
for _, p := range portsList {
717-
ports = append(ports, p.Name)
717+
if p.IsUSB {
718+
ports = append(ports, p.Name)
719+
}
718720
}
719721

720722
if ports == nil || len(ports) == 0 {

0 commit comments

Comments
 (0)