From dbe4bfbc06defc023e4712ae970394d23118bdaf Mon Sep 17 00:00:00 2001 From: ethernet Date: Fri, 18 Sep 2026 17:34:14 -0400 Subject: [PATCH] fix(update): keep --finish-update through the completion self re-exec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit source_completion.py re-execs itself into PM's selected interpreter before touching any product, and the passthrough argv only carried --desktop. So the startup heal's --finish-update was dropped, and the prepared invocation fell through to the install tail: an update reported itself as an install. ✓ Install complete! [main @ c4056e3d6b] Every flag that decides WHICH tail runs has to survive that boundary. Verified with a stub that captures the bootstrap command instead of running it: --finish-update present in the re-exec, --desktop still passed, and without the flag the install path is unchanged. File compiles. --- hermes_cli/source_completion.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hermes_cli/source_completion.py b/hermes_cli/source_completion.py index faae6580a3..324b2b72d7 100644 --- a/hermes_cli/source_completion.py +++ b/hermes_cli/source_completion.py @@ -113,7 +113,12 @@ def main(argv: list[str] | None = None) -> int: from hermes_cli.runtime_paths import activation_environment - command = _bootstrap_command(root, ["--desktop"] if args.desktop else []) + # This interpreter is a bootstrap one: the work happens in the re-exec, so + # every flag that decides WHICH tail runs has to survive into it. Losing + # --finish-update here silently reports an update as an install. + passthrough = (["--desktop"] if args.desktop else []) + \ + (["--finish-update"] if args.finish_update else []) + command = _bootstrap_command(root, passthrough) return subprocess.call(command, cwd=root, env=activation_environment(root))