fix: allow `confirm` to only accept 'y' or 'n' as input
Open
enhancement
- Dominant language
- Dart
- Stars
- 1.1k
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
We're seeing users accidentally enter input other than 'y' or 'n' to a `confirm` prompt that follows a long build step (see https://github.com/shorebirdtech/shorebird/issues/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`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.