From 08f157698fa607c2dbaaabb8cf4f4bae1f9f1ee2 Mon Sep 17 00:00:00 2001 From: Silvio Tomatis Date: Wed, 17 Apr 2019 15:07:48 +0200 Subject: [PATCH] Make sure tutor asks for permission before a possibly destructive action --- tutor/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutor/config.py b/tutor/config.py index 6b50779..bec18f7 100644 --- a/tutor/config.py +++ b/tutor/config.py @@ -77,13 +77,13 @@ def load(root): load_defaults(config) 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 " "v{} while the 'tutor' binary is at v{}. The environment will be " "upgraded now. Any change you might have made will be overwritten.".format( env.base_dir(root), env.version(root), __version__ ) - )) + ), abort=True) should_update_env = True if should_update_env: