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

Warn/validate commands with optional arguments before non-optional #499

Open
natecook1000 opened this issue Sep 23, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@natecook1000
Copy link
Member

As described in #489, a command that declares an optional @Argument before a non-optional @Argument won't ever allow a single-argument call. It would be nice if ArgumentParser provided a validation warning / error so that authors could move to a different design.

@natecook1000 natecook1000 added the enhancement New feature or request label Sep 23, 2022
@rauhul
Copy link
Contributor

rauhul commented Sep 23, 2022

I would consider this a logic bug and be a reasonable cause to fatalError or preconditionFailure.

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

No branches or pull requests

2 participants