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

CLI is silent when passed an unrecognized option #271

Closed
sedubois opened this issue Aug 19, 2018 · 10 comments · Fixed by #308
Closed

CLI is silent when passed an unrecognized option #271

sedubois opened this issue Aug 19, 2018 · 10 comments · Fixed by #308

Comments

@sedubois
Copy link
Contributor

Describe the bug
The lingui CLI is silent when it is passed an unrecognized option.

To Reproduce
$ lingui foo

Expected behavior
The CLI should display an error.

lingui --version: 2.4.1

@tricoder42
Copy link
Contributor

Indeed, this is how commander works, but it should at least show a help. Here's description of issue and possible fix: tj/commander.js#432 (comment)

Interested in sending PR?

@sedubois
Copy link
Contributor Author

I won't have time to send a PR but the issue is not critical so feel free to close, I just wanted to make it known.

@tricoder42
Copy link
Contributor

tricoder42 commented Aug 22, 2018 via email

@dephiros
Copy link
Contributor

@tricoder42 , it seems like something that I can contribute(trying to familiarize myself more with the project)
Will try to look into it and give a pull request soon!

@tricoder42
Copy link
Contributor

@dephiros That would be awesome! See the linked comment, there're some possible solutions.

@dephiros
Copy link
Contributor

@tricoder42 , should we address this with just return error or try to be more fancy with fuzzy match and return closest subcommands? With the fuzzy match, that would require an additional lib like hamming-compute unless we already have an alternative

@tricoder42
Copy link
Contributor

Sounds interesting! It's a backend code so I don't mind extra dependency. Feel free to do it if you're interested 👍

@dephiros
Copy link
Contributor

dephiros commented Sep 5, 2018

@tricoder42 , I am almost done with the pull request but stuck at a strange unit test failure: https://circleci.com/gh/lingui/js-lingui/2224?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
Could you help me take a look when you have a chance?
Thank you

@danielkcz
Copy link
Contributor

@dephiros I think you don't need to worry about that one, I've seen that failing before as well. There is something broken in general it seems. Just hold tight and @tricoder42 will surely merge it soon.

@tricoder42
Copy link
Contributor

Released in v2.7.0. Thanks @dephiros!

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.

4 participants