Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: