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

fix: allow confirm to only accept 'y' or 'n' as input #1202

Open
bryanoltman opened this issue Jan 2, 2024 · 0 comments
Open

fix: allow confirm to only accept 'y' or 'n' as input #1202

bryanoltman opened this issue Jan 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bryanoltman
Copy link

bryanoltman commented Jan 2, 2024

Description

We're seeing users accidentally enter input other than 'y' or 'n' to a confirm prompt that follows a long build step (see shorebirdtech/shorebird#1572). It would be a nice guardrail to only accept these inputs and re-display the prompt if we detect input that is not 'y' or 'n'. It would probably make sense to make this behavior optional and to not change the default behavior of confirm, maybe by adding an abortOnUnrecognizedInput argument to confirm that defaults to true.

@bryanoltman bryanoltman added the bug Something isn't working label Jan 2, 2024
@felangel felangel added enhancement New feature or request and removed bug Something isn't working labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants