From dc31408c906d2949d0ac7a15ff79a65e4ef5a6dc Mon Sep 17 00:00:00 2001 From: Jemy Zhang <58111+jemyzhang@users.noreply.github.com> Date: Wed, 29 May 2024 11:19:16 +0800 Subject: [PATCH] fix: device parse under windows system only 3 sections in `host:devices-l` response under windows system: [serial] device transport_id:[x] --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index a823223..7cb012c 100644 --- a/client.go +++ b/client.go @@ -85,7 +85,7 @@ func (c Client) DeviceList() (devices []Device, err error) { } fields := strings.Fields(line) - if len(fields) < 4 || len(fields[0]) == 0 { + if len(fields) < 3 || len(fields[0]) == 0 { debugLog(fmt.Sprintf("can't parse: %s", line)) continue }