Skip to content

Stricter checks on libs/cores arguments #431

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

Closed
wants to merge 3 commits into from
Closed

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Sep 27, 2019

Previously globals.ParseReferenceArgs was used to parse both core reference and library reference, but this doesn't work well because:

[email protected] is a valid library reference but not a valid core reference (because it's missing the architecture part like arduino:[email protected].

This PR adds another function global.ParseLibraryReferenceArgs that also provides a better error messages for the reason why the parameters are rejected:

  • invalid empty library name (ex: @2.3.4)
  • invalid empty library version (ex: MyLib@)

and for cores:

  • invalid empry core argument
  • invalid empty core reference (ex: @1.2.3)
  • invalid empty core version (ex: arduino:avr@)
  • invalid empty core name (ex: :[email protected])
  • invalid empty core architecture (ex arduino:@1.2.3)

@cmaglie cmaglie requested a review from masci September 27, 2019 11:12
@cmaglie cmaglie self-assigned this Oct 2, 2019
@cmaglie
Copy link
Member Author

cmaglie commented Feb 28, 2020

Already merged as part of #351

@cmaglie cmaglie closed this Feb 28, 2020
@cmaglie cmaglie deleted the cmaglie/args-parser branch February 28, 2020 16:20
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.

1 participant