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

Empty confirmation considered invalid in accessible mode #264

Closed
testinfected opened this issue May 30, 2024 · 2 comments · Fixed by #442
Closed

Empty confirmation considered invalid in accessible mode #264

testinfected opened this issue May 30, 2024 · 2 comments · Fixed by #442
Labels
bug Something isn't working confirm

Comments

@testinfected
Copy link

testinfected commented May 30, 2024

Describe the bug
When using the confirm field in accessible mode, user gets prompted to:

Choose [y/N]:

But when pressing enter, I was expecting the N choice to apply whereas I get:

Choose [y/N]:
invalid input. please try again
Choose [y/N]:

Looking at the code parseBool in accessibility.go expects exactly one of "y,", "yes","n" or "no". So the default value does not apply.

@testinfected
Copy link
Author

WDYGT?

Thanks

@jaredallard
Copy link
Contributor

Also running into this 😢

jaredallard added a commit to jaredallard/huh that referenced this issue Oct 25, 2024
Matching the prompt of "Choose [y/N]:" default is now
equal to N.

Resolves charmbracelet#264
@caarlos0 caarlos0 added bug Something isn't working confirm labels Nov 26, 2024
caarlos0 pushed a commit that referenced this issue Nov 27, 2024
Matching the prompt of "Choose [y/N]:" default is now
equal to N.

Resolves #264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants