mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 03:31:10 +00:00
fix: stop old cli after package-to-git switch
This commit is contained in:
@@ -1043,15 +1043,7 @@ describe("update-cli", () => {
|
||||
.mock.calls.map((call) => String(call[0]))
|
||||
.join("\n"),
|
||||
).toContain(
|
||||
"Skipped plugin update sync in the pre-update CLI process after switching to a git install.",
|
||||
);
|
||||
expect(
|
||||
vi
|
||||
.mocked(defaultRuntime.log)
|
||||
.mock.calls.map((call) => String(call[0]))
|
||||
.join("\n"),
|
||||
).toContain(
|
||||
"Skipped completion/restart follow-ups in the pre-update CLI process after switching to a git install.",
|
||||
"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.",
|
||||
);
|
||||
});
|
||||
it("explains why git updates cannot run with edited files", async () => {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user