-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Prompt to confirm upgrade #11601
Prompt to confirm upgrade #11601
Conversation
@Tobbe my friend 🙏 - any thoughts on this one? I still like this concept... especially because running |
Let's do it! I'll take a look rn |
I got a bit carried away with a couple of tweaks 😅 Added a (There's an open issue about the Confirm prompt defaults: enquirer/enquirer#334) @pantheredeye let me know what you think about my changes. If you hate them all I can revert 😄 |
@Tobbe these look good and the flag makes sense! LGTM! 😆 🚀 |
I just realized this is breaking for anyone who might have |
good catch! 👍 |
Added a prompt after running
yarn rw upgrade
to confirm before starting.Motivation: I have upgraded a project twice, that I remember, on accident while looking for information about the latest upgrade. Right now, when a user runs
yarn rw upgrade
the process starts immediately. This check adds a simple prompt to the beginning of listr tasks to confirm if they want to upgrade the project.Thoughts:
The prompt method is taken from other cli commands using a prompt. It defaults to adding
(Y/n) >> true
to the end of the prompt. I don't like the mismatch in terms. But, I can't figure out how to default it to 'yes' instead of true.I looked for tests related to the upgrade command, but didn't find them.
Screenshots:
Prompt:
Upgrade Cancelled:
Upgrade Confirmed: