Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when port or fqbn flags are not set #523

Merged
merged 2 commits into from
Dec 27, 2019

Conversation

federicobond
Copy link
Contributor

This changeset marks the fqbn and port CLI flags as required in the compile and upload commands. The error message is thus changed from the generic:

Error during Upload: no upload port provided

To the more directly actionable:

Error: required flag(s) "fqbn", "port" not set

Which is followed by the CLI help text.

@federicobond federicobond force-pushed the improve-error-msgs branch 2 times, most recently from 0a42661 to d235a6b Compare December 19, 2019 06:05
@masci
Copy link
Contributor

masci commented Dec 19, 2019

Hi @federicobond thanks for the PR.

The code doesn't compile, can you please go through this doc https://github.com/arduino/arduino-cli/blob/master/CONTRIBUTING.md, make sure tests pass on your computer and then push again?

I'll review your code as soon as the tests pass, thanks!

@federicobond
Copy link
Contributor Author

Hi @masci, sorry about that, I was trying to get the integration tests to pass and I botched the latest code changes! I still have some problems with the test match because the error is written to stderr, which is not captured by executeWithArgs. I will try to fix that soon.

@federicobond
Copy link
Contributor Author

@masci done!

Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 PR looks great!


currDownloadDir string
currDataDir string
currSketchbookDir string
)

type stdOutRedirect struct {
type outputRedirect struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@masci masci added this to the 0.8.0 milestone Dec 20, 2019
@masci masci merged commit 49897ef into arduino:master Dec 27, 2019
@federicobond
Copy link
Contributor Author

I just noticed that this does not play along well with the board FQBN configured via the sketch.json file. My bad! I will try to submit a fix shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants