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

add clap requires to flags that depent on --report #111

Merged

Conversation

jhscheer
Copy link
Contributor

@jhscheer jhscheer commented Apr 2, 2023

While playing around with et I was wondering why --human had no effect until I noticed that it's supposed to be used in combination with --report.
This adds the requires tag to --human and --file-name in order to print a useful error message when these options are used without --report.

A better alternative approach would be to implement something like: et --report=human,file-name, but I think that's only possible with clap's Builder API.

Copy link
Owner

@solidiquis solidiquis left a comment

Choose a reason for hiding this comment

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

Ahhh I had no idea about the requires API thanks for this!

@solidiquis solidiquis merged commit 61cc59b into solidiquis:master Apr 2, 2023
2 checks passed
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.

None yet

2 participants