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

spk rm needs reliable confirmation prompts when working on a non-local repo #1026

Open
jrray opened this issue May 15, 2024 · 0 comments
Open
Labels
agenda item Items to be brought up at the next dev meeting

Comments

@jrray
Copy link
Collaborator

jrray commented May 15, 2024

At present, spk rm only prompts for confirmation if the user is attempting to delete an entire package, as in spk rm pkgname. It does not prompt if any '/' appears in the deletion subject, as in spk rm pkgname/1.0.

This means that even spk rm -r origin pkgname/1.0 will proceed with the deletion without a confirmation prompt. This unsettles users who would like to see what is going to happen before applying the change.

The current behavior is okay when working on the local repo and having fewer confirmation prompts for less risky operations is desirable, because otherwise users can fall into the habit of typing --yes all the time and then make mistakes.

The proposal is to rework the logic of spk rm so it can create a plan of all it is going to do (making it also possible to implement a --dry-run option), print a message of what it is going to do, and prompt once for confirmation. A key change is that the prompt is mandatory no matter what is going to be deleted if anything that is to be deleted lives in a repo other than the local repo. The --yes flag would continue to bypass the prompt.

@jrray jrray added the agenda item Items to be brought up at the next dev meeting label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agenda item Items to be brought up at the next dev meeting
Projects
None yet
Development

No branches or pull requests

1 participant