



























@@ -1663,9 +1663,11 @@ describe("update-cli", () => {
16631663);
1664166416651665expect(defaultRuntime.error).not.toHaveBeenCalledWith(
1666-expect.stringContaining(
1666+[
16671667"Package updates cannot run from inside the gateway service process.",
1668-),
1668+"That path replaces the active OpenClaw dist tree while the live gateway may still lazy-load old chunks.",
1669+"Run `openclaw update` from a shell outside the gateway service, or stop the gateway service first and then update.",
1670+].join("\n"),
16691671);
16701672expectPackageInstallSpec("openclaw@latest");
16711673});
@@ -1692,9 +1694,11 @@ describe("update-cli", () => {
16921694);
1693169516941696expect(defaultRuntime.error).toHaveBeenCalledWith(
1695-expect.stringContaining(
1697+[
16961698"Package updates cannot run from inside the gateway service process.",
1697-),
1699+"That path replaces the active OpenClaw dist tree while the live gateway may still lazy-load old chunks.",
1700+"Run `openclaw update` from a shell outside the gateway service, or stop the gateway service first and then update.",
1701+].join("\n"),
16981702);
16991703expect(defaultRuntime.exit).toHaveBeenCalledWith(1);
17001704expect(serviceStop).not.toHaveBeenCalled();
@@ -1736,9 +1740,11 @@ describe("update-cli", () => {
17361740);
1737174117381742expect(defaultRuntime.error).toHaveBeenCalledWith(
1739-expect.stringContaining(
1743+[
17401744"Package updates cannot run from inside the gateway service process.",
1741-),
1745+"That path replaces the active OpenClaw dist tree while the live gateway may still lazy-load old chunks.",
1746+"Run `openclaw update` from a shell outside the gateway service, or stop the gateway service first and then update.",
1747+].join("\n"),
17421748);
17431749expect(defaultRuntime.exit).toHaveBeenCalledWith(1);
17441750expect(serviceStop).not.toHaveBeenCalled();
@@ -1767,9 +1773,11 @@ describe("update-cli", () => {
17671773);
1768177417691775expect(defaultRuntime.error).toHaveBeenCalledWith(
1770-expect.stringContaining(
1776+[
17711777"Package updates cannot run from inside the gateway service process.",
1772-),
1778+"That path replaces the active OpenClaw dist tree while the live gateway may still lazy-load old chunks.",
1779+"Run `openclaw update` from a shell outside the gateway service, or stop the gateway service first and then update.",
1780+].join("\n"),
17731781);
17741782expect(defaultRuntime.exit).toHaveBeenCalledWith(1);
17751783expect(serviceStop).not.toHaveBeenCalled();
@@ -3274,25 +3282,26 @@ describe("update-cli", () => {
32743282name: "update command invalid timeout",
32753283run: async () => await updateCommand({ timeout: "invalid" }),
32763284requireTty: false,
3277-expectedError: "timeout",
3285+expectedError: "--timeout must be a positive integer (seconds)",
32783286},
32793287{
32803288name: "update status command invalid timeout",
32813289run: async () => await updateStatusCommand({ timeout: "invalid" }),
32823290requireTty: false,
3283-expectedError: "timeout",
3291+expectedError: "--timeout must be a positive integer (seconds)",
32843292},
32853293{
32863294name: "update wizard invalid timeout",
32873295run: async () => await updateWizardCommand({ timeout: "invalid" }),
32883296requireTty: true,
3289-expectedError: "timeout",
3297+expectedError: "--timeout must be a positive integer (seconds)",
32903298},
32913299{
32923300name: "update wizard requires a TTY",
32933301run: async () => await updateWizardCommand({}),
32943302requireTty: false,
3295-expectedError: "Update wizard requires a TTY",
3303+expectedError:
3304+"Update wizard requires a TTY. Use `openclaw update --channel <stable|beta|dev>` instead.",
32963305},
32973306] as const)(
32983307"validates update command invocation errors: $name",
@@ -3303,9 +3312,7 @@ describe("update-cli", () => {
3303331233043313await run();
330533143306-expect(defaultRuntime.error, name).toHaveBeenCalledWith(
3307-expect.stringContaining(expectedError),
3308-);
3315+expect(defaultRuntime.error, name).toHaveBeenCalledWith(expectedError);
33093316expect(defaultRuntime.exit, name).toHaveBeenCalledWith(1);
33103317},
33113318);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。