From 31eab76632773224e481d1ec784d45b45b673434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 8 Dec 2021 11:20:41 +0100 Subject: [PATCH] fix: breaking "config save" "config save" was not loading the full configuration prior to saving the environment. --- tutor/commands/config.py | 3 ++- tutor/config.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tutor/commands/config.py b/tutor/commands/config.py index 964813d5e6..177a0a3ae0 100644 --- a/tutor/commands/config.py +++ b/tutor/commands/config.py @@ -59,7 +59,8 @@ def save( if not env_only: tutor_config.save_config_file(context.root, config) - tutor_config.render_full(config) + # Reload configuration, without version checking + config = tutor_config.load_full(context.root) env.save(context.root, config) diff --git a/tutor/config.py b/tutor/config.py index 4973d24f6a..edc9414470 100644 --- a/tutor/config.py +++ b/tutor/config.py @@ -19,7 +19,6 @@ def load(root: str) -> Config: "quickstart` prior to running other commands." ) env.check_is_up_to_date(root) - convert_json2yml(root) return load_full(root) @@ -39,6 +38,7 @@ def load_full(root: str) -> Config: """ Load a full configuration, with user, base and defaults. """ + convert_json2yml(root) config = get_user(root) update_with_base(config) update_with_defaults(config)