Skip to content

board list command fails completely if even a single discovery can't be run #1666

Closed
@silvanocerza

Description

@silvanocerza

Bug Report

Current behavior

$ arduino-cli board list
Error detecting boards: Error getting board list: [listing ports from discovery builtin:mdns-discovery: command failed: mdns lookup error: write udp6 [::]:63214->[ff02::fb]:5353: sendto: no route to host]

The board list command runs all the discoveries installed by default, if at least one of those returns an error the command fails even if partial results could be returned.

Expected behavior

$ arduino-cli board list
Warning: `mdn-discovery` failed to run: <detail error here>
Port          Protocol Type              Board Name      FQBN                                  Core
/dev/ttyACM0  serial   Unknown
/dev/ttyACM1  serial   Serial Port (USB) Arduino MKR1000 arduino-beta-development:samd:mkr1000 arduino-beta-development:samd
                       Serial Port (USB) Arduino MKR1000 arduino:samd:mkr1000                  arduino:samd

The board list command runs all the discoveries and returns errors only for those that are failing, results from those not failing are returned.

Environment

  • CLI version (output of arduino-cli version): 0.21.0
  • OS and platform: *

Additional context

This partially handles #1543 but doesn't solve it in full.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions