From 3d7717eb1c8fc773509c6ad2549f61449d2122a2 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Wed, 18 Sep 2019 11:12:02 +0200 Subject: [PATCH] add detected port even if the board couldn't be recognized --- commands/board/list.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/board/list.go b/commands/board/list.go index 5f68b25c1a5..24df2573882 100644 --- a/commands/board/list.go +++ b/commands/board/list.go @@ -115,14 +115,16 @@ func List(instanceID int32) ([]*rpc.DetectedPort, error) { port.IdentificationPrefs.Get("pid")) items, err := apiByVidPid(url) if err == ErrNotFound { - // the board couldn't be detected, keep going with the next port + // the board couldn't be detected, print a warning logrus.Debug("Board not recognized") - continue } else if err != nil { // this is bad, bail out return nil, errors.Wrap(err, "error getting board info from Arduino Cloud") } + // add a DetectedPort entry in any case: the `Boards` field will + // be empty but the port will be shown anyways (useful for 3rd party + // boards) b = items }