From 6faad48bcd9fbf6f5f0777aceb1a26f34c5e8604 Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Thu, 18 Jul 2024 16:38:22 +0330 Subject: [PATCH] fix: show interactive config message in the right place Before this, the "Interactive platform configuration" message was shown even if -I flag was set for tutor dev|local launch. --- tutor/commands/compose.py | 2 +- tutor/commands/k8s.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tutor/commands/compose.py b/tutor/commands/compose.py index 0ad56bc771..3e8495d128 100644 --- a/tutor/commands/compose.py +++ b/tutor/commands/compose.py @@ -188,9 +188,9 @@ def interactive_configuration( interactive: bool, run_for_prod: t.Optional[bool] = None, ) -> None: - click.echo(fmt.title("Interactive platform configuration")) config = tutor_config.load_minimal(context.obj.root) if interactive: + click.echo(fmt.title("Interactive platform configuration")) interactive_config.ask_questions( config, context.obj.root, diff --git a/tutor/commands/k8s.py b/tutor/commands/k8s.py index 4b9d433876..4af21ac1d7 100644 --- a/tutor/commands/k8s.py +++ b/tutor/commands/k8s.py @@ -225,9 +225,9 @@ def launch(context: click.Context, non_interactive: bool) -> None: from_release=tutor_env.get_env_release(context.obj.root), ) - click.echo(fmt.title("Interactive platform configuration")) config = tutor_config.load_minimal(context.obj.root) if not non_interactive: + click.echo(fmt.title("Interactive platform configuration")) interactive_config.ask_questions(config, context.obj.root, run_for_prod=True) tutor_config.save_config_file(context.obj.root, config) config = tutor_config.load_full(context.obj.root)