Require confirmation for setupvm, upgradevm, init #360
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.
Fixes #258 and #356
So this was initially written by Perplexity AI (because I thought this would be a good test case for upgrading existing code in an easily-parsable and testable way), but I stripped some changes back (it messed with a variable name), and it handled init differently which seemed silly, so I made it handle init the same way it handles setupvm and upgradevm. It also included the exact file being checked in the prompt, and I changed the language there because I am testing for the existence of one file, but using it to prompt for confirmation of the entire action. (I believe the
returnshould end the entire function?)Note that I have not yet tested this at all, but will do some tests on it later today and verify if it works as intended. It reads reasonable to me though.
I'd be thrilled if anyone else was able to test this too. cc: @neuroradiology @orblivion @troyjfarrell