mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
Discover USB ports only
This will ignore f.ex. bluetooth
This commit is contained in:
@@ -714,8 +714,10 @@ func getDefaultPort(portCandidates []string) (port string, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, p := range portsList {
|
for _, p := range portsList {
|
||||||
|
if p.IsUSB {
|
||||||
ports = append(ports, p.Name)
|
ports = append(ports, p.Name)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ports == nil || len(ports) == 0 {
|
if ports == nil || len(ports) == 0 {
|
||||||
// fallback
|
// fallback
|
||||||
|
|||||||
Reference in New Issue
Block a user