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

Usability improvement: tell users when they use an invalid flag #1172

Closed
st0012 opened this issue Sep 15, 2022 · 1 comment · Fixed by #1208
Closed

Usability improvement: tell users when they use an invalid flag #1172

st0012 opened this issue Sep 15, 2022 · 1 comment · Fixed by #1208
Labels
enhancement New feature or request good-first-issue Good for newcomers

Comments

@st0012
Copy link
Member

st0012 commented Sep 15, 2022

As a new tapioca user, I was debugging a worker related issue with bin/tapioca dsl --verify --worker=1, but only found out I should've used --worker[s]=1 instead after an hour. So I think it could be helpful if tapioca can raise an error or give a warning about invalid flags. I think suggesting the correct name is even possible with the did_you_mean gem.

@st0012 st0012 added the enhancement New feature or request label Sep 15, 2022
@paracycle
Copy link
Member

I think all we need to do is to call check_unknown_options! inside the CLI class: https://github.com/rails/thor/blob/e4907fdd663d0a1ff51d18eb1827552ee61300a3/lib/thor/base.rb#L150-L154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good-first-issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants