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(cli): hc check and schema will print help msg when no subcommand #107

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

j-lanson
Copy link
Collaborator

@j-lanson j-lanson commented Jun 2, 2024

This MR resolves #105 and #106 issues pertaining to the replacement of unhelpful error msgs that Hipcheck emits when either check or schema subcommands are invoked without any arguments.

This is addressed simply by updating the type of the command field in the CheckArgs and SchemaArgs structs from an Option to just the underlying type. This conveys to clap that some subcommand must be parsed from the remaining arguments for things to move forward - if this does not happen, it will print the -h help msg.

The match statements associated with these command fields in main.rs are updated in accordance with this change.

@j-lanson j-lanson requested a review from alilleybrinker June 2, 2024 15:53
@j-lanson j-lanson linked an issue Jun 2, 2024 that may be closed by this pull request
@alilleybrinker
Copy link
Collaborator

LGTM!

@alilleybrinker alilleybrinker merged commit 0d00821 into main Jun 3, 2024
9 checks passed
@j-lanson j-lanson deleted the jlanson/subcmd-help branch June 3, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make hc schema equivalent to hc schema -h Make hc check equivalent to hc check -h
2 participants