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

Error on misspelled command is different #401

Closed
tejasbubane opened this issue Jul 12, 2017 · 8 comments
Closed

Error on misspelled command is different #401

tejasbubane opened this issue Jul 12, 2017 · 8 comments

Comments

@tejasbubane
Copy link
Member

tejasbubane commented Jul 12, 2017

I misspelled the submit command and saw the error was a little different:

❯ exercism submmit hello_world.ml
No help topic for 'submmit'

I think this can be handled in a better way - eg. Invalid command <command name> followed the entire help section.

  • cli version 2.4.1
@Tonkpils
Copy link
Contributor

Thanks for reporting this! It does seem like we should handle invalid cases a bit better.

@kytrinyx
Copy link
Member

kytrinyx commented Aug 4, 2017

I suspect that this will be handled better in the nextercism CLI, as we're using Cobra, which has some pretty snazzy help functionality.

TODO: build a local version of the nextercism branch (in #410) and see if the suggestions are better.

@kytrinyx
Copy link
Member

@tejasbubane would you see if this is handled better in https://github.com/exercism/cli/releases/tag/v3.0.0-alpha.2?

@tejasbubane
Copy link
Member Author

@kytrinyx Yup, its better now.

But I see two issues there:

  • The error is shown twice.
  • Error message says for "". Should it be for nextercism (or for exercism)?
➜ nextercism version
exercism version 3.0.0-alpha.2

➜ nextercism submmit hello-world/hello_world.ml
Error: unknown command "submmit" for ""

Did you mean this?
	submit

Run ' --help' for usage.
unknown command "submmit" for ""

Did you mean this?
	submit

@kytrinyx
Copy link
Member

➜ nextercism version
exercism version 3.0.0-alpha.2

Ah. We should use the binary name for this, rather than hard-coding Exercism. I'll fix that.

The other thing is weird, I'm not sure why it's happening. It should definitely not show it twice, and it should also use the binary name rather than "".

@stale
Copy link

stale bot commented Oct 17, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 17, 2017
@tejasbubane
Copy link
Member Author

The main issue here seems to be fixed with improved error message:
Error: unknown command "submmit"

Should the duplication thing be moved to a separate issue?

@stale stale bot removed the wontfix label Oct 18, 2017
@kytrinyx
Copy link
Member

Yeah, would you mind opening a new issue for the duplication thing? I'll close this one.

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

No branches or pull requests

3 participants