mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-11 17:38:46 +00:00
Make sure tutor asks for permission before a possibly destructive action
This commit is contained in:
parent
1046b48cc1
commit
08f157698f
@ -77,13 +77,13 @@ def load(root):
|
|||||||
load_defaults(config)
|
load_defaults(config)
|
||||||
|
|
||||||
if not env.is_up_to_date(root):
|
if not env.is_up_to_date(root):
|
||||||
click.echo(fmt.alert(
|
click.confirm(fmt.alert(
|
||||||
"The current environment stored at {} is not up-to-date: it is at "
|
"The current environment stored at {} is not up-to-date: it is at "
|
||||||
"v{} while the 'tutor' binary is at v{}. The environment will be "
|
"v{} while the 'tutor' binary is at v{}. The environment will be "
|
||||||
"upgraded now. Any change you might have made will be overwritten.".format(
|
"upgraded now. Any change you might have made will be overwritten.".format(
|
||||||
env.base_dir(root), env.version(root), __version__
|
env.base_dir(root), env.version(root), __version__
|
||||||
)
|
)
|
||||||
))
|
), abort=True)
|
||||||
should_update_env = True
|
should_update_env = True
|
||||||
|
|
||||||
if should_update_env:
|
if should_update_env:
|
||||||
|
Loading…
Reference in New Issue
Block a user