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

feat: support exclusive/conflicting options #3978

Closed
erezrokah opened this issue Jan 7, 2022 · 3 comments · Fixed by #6909
Closed

feat: support exclusive/conflicting options #3978

erezrokah opened this issue Jan 7, 2022 · 3 comments · Fixed by #6909
Labels
good first issue type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@erezrokah
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Before the switch from oclif to commander we could configure exclusive options, see

exclusive: ['build'],

That is, we could configure to report an error when a user tries to use options that won't make sense together.

commander doesn't seem to support it, based on tj/commander.js#1358 (comment)

Describe the solution you'd like

A ability to configure conflicting/exclusive options.

Describe alternatives you've considered

N/A

Additional context

We can implement this in a custom way in the CLI repo, or contribute to commander

Can you submit a pull request?

Yes

@erezrokah erezrokah added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jan 7, 2022
@erezrokah
Copy link
Contributor Author

Being discussed in tj/commander.js#1678

@erezrokah
Copy link
Contributor Author

tj/commander.js#1678 got merged 🚀 so once released we should be able to move on this issue

@erezrokah
Copy link
Contributor Author

This is now built-in into Commander.js, see https://github.com/tj/commander.js/releases/tag/v9.1.0.
Marking this good first issue as it should be fairly easy to implement now by:

  1. Looking as the code of the CLI before the switch to Commander.js
  2. Writing down the conflicting options
  3. Re-add any conflicting via the newly supported Commander.js feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant