Skip to content

Commit

Permalink
fix: show interactive config message in the right place
Browse files Browse the repository at this point in the history
Before this, the "Interactive platform configuration" message was shown even if -I flag was set for tutor dev|local launch.
  • Loading branch information
CodeWithEmad committed Aug 11, 2024
1 parent 30fdc4a commit 6faad48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tutor/commands/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tutor/commands/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6faad48

Please sign in to comment.