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

Passing an invalid option without an explicit sub-command skips suggesting help #1304

Closed
Gedochao opened this issue Aug 29, 2022 · 0 comments · Fixed by #1305
Closed

Passing an invalid option without an explicit sub-command skips suggesting help #1304

Gedochao opened this issue Aug 29, 2022 · 0 comments · Fixed by #1305
Labels
bug Something isn't working UX

Comments

@Gedochao
Copy link
Contributor

Gedochao commented Aug 29, 2022

Version(s)
0.1.12

Describe the bug
Passing an invalid option (i.e. erroneously passing an option belonging to another sub-command) to an explicitly chosen sub-command suggests looking at the relevant help.

▶ scala-cli run . --invalid-option
Unrecognized argument: --invalid-option

To list all available options, run
  scala-cli run --help

However, doing the same for the default command skips that.

▶ scala-cli . --invalid-option
Unrecognized argument: --invalid-option

Expected behaviour
I would expect the following:

▶ scala-cli . --invalid-option
Unrecognized argument: --invalid-option

To list all available options, run
  scala-cli --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UX
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant