From 01acb82b885cc45fc4e9eac50e0bb7a75416e8d0 Mon Sep 17 00:00:00 2001 From: Larslllllll Date: Sun, 6 Sep 2026 01:54:51 +0200 Subject: [PATCH] fix(init): skip interactive prompts when --resume is passed (issue #2098) When --resume is passed, the interactive gate was bypassed for the git-tier check but all other prompts (mode menu, provider selection, etc.) ran again. This changes the is_interactive expression to include `and not resume` so that resume runs fall through to the non-interactive path that reads stored configuration from .repowise/config.yaml and state.json. Also prints a one-line notice naming the mode being resumed so the user can confirm the run was picked up rather than restarted. --- packages/cli/src/repowise/cli/commands/init_cmd/command.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/repowise/cli/commands/init_cmd/command.py b/packages/cli/src/repowise/cli/commands/init_cmd/command.py index d97fd46f4..98dedb285 100644 --- a/packages/cli/src/repowise/cli/commands/init_cmd/command.py +++ b/packages/cli/src/repowise/cli/commands/init_cmd/command.py @@ -1007,7 +1007,12 @@ def init_command( # ---- Interactive mode (TTY, no explicit flags) ---- # --yes forces non-interactive even on a TTY (mirrors the workspace path), # so a scripted `init -y` never blocks on the mode-selection menu. - is_interactive = sys.stdin.isatty() and provider_name is None and not index_only and not yes + # --resume also forces non-interactive: reuse stored answers and resume without + # re-prompting (fixes issue #2098). + if resume: + mode_desc = "fast index-only" if index_only else "full" + console.print(f"[dim]Resuming a {mode_desc} run — reusing stored configuration.[/dim]") + is_interactive = sys.stdin.isatty() and provider_name is None and not index_only and not yes and not resume # Output language picked in the advanced-mode generation section; None # until chosen. Resolved below: flag > this > config.yaml > English.