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

Make yes/no prompts typo tolerant, and accept "y" or "n" as inputs #498

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

r-n-o
Copy link
Contributor

@r-n-o r-n-o commented Dec 20, 2024

Summary & Motivation (Problem vs. Solution)

Currently when we approve manifests or re-encrypt shares, a single typo aborts the whole process. This PR makes things a bit more resilient to typos by:

  • accepting "y" or "Yes" or "YES" as valid "yes" values (and "n"/"No"/"NO" as valid "no" values)
  • retrying if the answer isn't one of these options, up to 3 attempts

How I Tested These Changes

Integration + unit tests

@r-n-o r-n-o requested a review from a team as a code owner December 20, 2024 09:45
Copy link
Contributor

@Ulexus Ulexus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the single best PR I have seen in a long time!

@r-n-o r-n-o merged commit 434b39b into main Dec 20, 2024
6 checks passed
@r-n-o r-n-o deleted the rno/typo-tolerant-prompts branch December 20, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants