






















@@ -782,6 +782,31 @@ describe("update-cli", () => {
782782expect(spawn).not.toHaveBeenCalled();
783783});
784784785+it("post-core resume children exit after writing a plugin update result", async () => {
786+const resultDir = createCaseDir("openclaw-post-core-result");
787+const resultPath = path.join(resultDir, "plugins.json");
788+await fs.mkdir(resultDir, { recursive: true });
789+790+await withEnvAsync(
791+{
792+OPENCLAW_UPDATE_POST_CORE: "1",
793+OPENCLAW_UPDATE_POST_CORE_CHANNEL: "stable",
794+OPENCLAW_UPDATE_POST_CORE_RESULT_PATH: resultPath,
795+},
796+async () => {
797+await updateCommand({ restart: false });
798+},
799+);
800+801+const result = JSON.parse(await fs.readFile(resultPath, "utf-8")) as {
802+status?: string;
803+};
804+expect(result.status).toBe("ok");
805+expect(defaultRuntime.exit).toHaveBeenCalledWith(0);
806+expect(runGatewayUpdate).not.toHaveBeenCalled();
807+expect(spawn).not.toHaveBeenCalled();
808+});
809+785810it("post-core resume mode persists the requested update channel with the updated process", async () => {
786811vi.mocked(readConfigFileSnapshot).mockResolvedValue({
787812 ...baseSnapshot,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。