arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

Add suggestions when a wrong FQBN is provided (installed platforms only)

Open facchinm opened this issue 4 years ago • 0 comments
trafficstars

Please check if the PR fulfills these requirements

  • [x] The PR has no duplicates (please search among the Pull Requests before creating one)
  • [x] The PR follows our contributing guidelines
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)
  • [ ] UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?

This PR tries to ease one of the pain points when dealing with the cli without fqbn autocompletion (fat fingers). If the fqbn is wrong, try to find the closest match between installed platforms and suggest it to the interactive user.

  • What is the current behavior?

No suggestion is given, and finding what is actually causing the error can be daunting

  • What is the new behavior?

A suggestion is provided, for example:

~/arduino-cli upload -p /dev/ttyACM0 --fqbn=arduino:mbed_nano:nano_rp2040_connect Blink
Error during Upload: Error resolving FQBN: board arduino:[email protected]:nano_rp2040_connect not found, did you mean arduino:mbed_nano:nanorp2040connect?
  • Other information:

Fixes arduino/arduino-cli#1366


See how to contribute

facchinm avatar Jul 26 '21 15:07 facchinm