Skip to content

Commit

Permalink
fix: breaking "config save"
Browse files Browse the repository at this point in the history
"config save" was not loading the full configuration prior to saving the
environment.
  • Loading branch information
regisb committed Dec 8, 2021
1 parent 092dfbf commit 31eab76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tutor/commands/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion tutor/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand All @@ -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)
Expand Down

0 comments on commit 31eab76

Please sign in to comment.