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

Use --yes click option for confirmation to delete the backup. #152

Closed
alichtman opened this issue Oct 28, 2018 · 2 comments
Closed

Use --yes click option for confirmation to delete the backup. #152

alichtman opened this issue Oct 28, 2018 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed UI/UX

Comments

@alichtman
Copy link
Owner

alichtman commented Oct 28, 2018

Example from Click docs:

@click.command()
@click.option('--yes', is_flag=True, callback=abort_if_false,
              expose_value=False,
              prompt='Are you sure you want to drop the db?')
def dropdb():
    click.echo('Dropped all tables!')
@alichtman alichtman added help wanted Extra attention is needed good first issue Good for newcomers UI/UX labels Oct 28, 2018
@0az
Copy link

0az commented Oct 29, 2018

Mind if I work on this?

E: If my read of the issue is correct, based on a bit of hacking on the code, implementing this is nontrivial without significant refactor. The current option-based subcommand implementation makes it very hard, if not impossible to implement this without breaking something.

@alichtman
Copy link
Owner Author

Your take might be correct. I didn't look too closely at possible implementations for this before opening the issue.

The real question is whether we actually want a "delete backup" confirmation prompt shown if the delete arg is used on a CLI, and I don't think we do.

Reopen this if you have a strong opposing view, but my thinking is that --remove, or whatever the flag is named, is enough of a confirmation that accidental deletion should be impossible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed UI/UX
Projects
None yet
Development

No branches or pull requests

2 participants