fix: stop old cli after package-to-git switch

This commit is contained in:
Peter Steinberger
2026-04-06 02:17:12 +01:00
parent 4661bf66c4
commit eba8fed94b
2 changed files with 12 additions and 9 deletions

View File

@@ -1038,6 +1038,17 @@ export async function updateCommand(opts: UpdateCommandOptions): Promise<void> {
return;
}
if (switchToGit && result.status === "ok" && result.mode === "git") {
if (!opts.json) {
defaultRuntime.log(
theme.muted(
"Switched from a package install to a git checkout. Skipping remaining post-update work in the old CLI process; rerun follow-up commands from the new git install if needed.",
),
);
}
return;
}
let postUpdateConfigSnapshot = configSnapshot;
if (requestedChannel && configSnapshot.valid && requestedChannel !== storedChannel) {
if (switchToGit) {