mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
feat: env only mode for config generation
chore: added -e flag to the changelog
This commit is contained in:
parent
e7d3e722ce
commit
31a41f81c3
@ -5,6 +5,7 @@ Note: Breaking changes between versions are indicated by "💥".
|
||||
## Unreleased
|
||||
|
||||
- [Bugfix] Fix "upstream sent too big header" error during login of existing users after a Koa to Lilac upgrade.
|
||||
- [Feature] Added the ability to skip `config.yml` file modification while running `tutor config save` command with `-e` or `--env-only` flag.
|
||||
|
||||
## v12.0.0 (2021-06-09)
|
||||
|
||||
|
@ -39,9 +39,16 @@ def config_command() -> None:
|
||||
multiple=True,
|
||||
help="Remove a configuration value (can be used multiple times)",
|
||||
)
|
||||
@click.option(
|
||||
"-e", "--env-only", "env_only", is_flag=True, help="Skip updating config.yaml"
|
||||
)
|
||||
@click.pass_obj
|
||||
def save(
|
||||
context: Context, interactive: bool, set_vars: Config, unset_vars: List[str]
|
||||
context: Context,
|
||||
interactive: bool,
|
||||
set_vars: Config,
|
||||
unset_vars: List[str],
|
||||
env_only: bool,
|
||||
) -> None:
|
||||
config, defaults = interactive_config.load_all(
|
||||
context.root, interactive=interactive
|
||||
@ -50,7 +57,8 @@ def save(
|
||||
tutor_config.merge(config, dict(set_vars), force=True)
|
||||
for key in unset_vars:
|
||||
config.pop(key, None)
|
||||
tutor_config.save_config_file(context.root, config)
|
||||
if not env_only:
|
||||
tutor_config.save_config_file(context.root, config)
|
||||
tutor_config.merge(config, defaults)
|
||||
env.save(context.root, config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user