fix: allow `confirm` to only accept 'y' or 'n' as input
bryanoltman opened this issue · comments
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
.