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

Show "help" output when no args passed on subscription show command #3739

Closed
adrianbenavides opened this issue Oct 26, 2022 · 0 comments · Fixed by #3746
Closed

Show "help" output when no args passed on subscription show command #3739

adrianbenavides opened this issue Oct 26, 2022 · 0 comments · Fixed by #3746

Comments

@adrianbenavides
Copy link
Member

adrianbenavides commented Oct 26, 2022

Current

The subscription show command panics when no argument is passed. This happens because the arguments are optional and the group attribute is configured so that it doesn't require any of them.

There are two possible solutions to this:

  1. Configuring the group so it requires either of the arguments
  2. Showing the help output when no arguments are passed

Desired

We want to apply the second solution as we want every command to be consistent and show the help output when no arguments are passed. To do that, the following attribute must be added to the subcommand:

#[command(arg_required_else_help = true)]
Show {
...
}

We love helping new contributors!
If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion.
If you're looking for other issues to contribute to, checkout this discussion and labels - good first issue or help wanted

Dark-Knight11 added a commit to Dark-Knight11/ockam that referenced this issue Oct 26, 2022
The subscription show command panics when no argument is passed because the arguments are optional and the group attribute is configured so that it doesn't require any of them.

We are fixing it by adding help menu when no arguments are passed.

ref: build-trust#3739
@adrianbenavides adrianbenavides linked a pull request Oct 27, 2022 that will close this issue
4 tasks
@mergify mergify bot closed this as completed in #3746 Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant