



























@@ -14,14 +14,11 @@ import {
1414disableCurrentOpenClawUpdateLaunchdJob,
1515disableOpenClawUpdateLaunchdJob,
1616findStaleOpenClawUpdateLaunchdJobs,
17-isLaunchAgentListed,
18-isOpenClawUpdateLaunchdLabel,
1917parseLaunchctlPrint,
2018parseLaunchctlListOpenClawUpdateJobs,
2119readLaunchAgentProgramArguments,
2220readLaunchAgentRuntime,
2321repairLaunchAgentBootstrap,
24-removeOpenClawUpdateLaunchdJob,
2522restartLaunchAgent,
2623resolveLaunchAgentPlistPath,
2724stopLaunchAgent,
@@ -456,22 +453,6 @@ describe("launchd runtime state", () => {
456453});
457454458455describe("launchctl list detection", () => {
459-it("detects the resolved label in launchctl list", async () => {
460-state.listOutput = "123 0 ai.openclaw.gateway\n";
461-const listed = await isLaunchAgentListed({
462-env: { HOME: "/Users/test", OPENCLAW_PROFILE: "default" },
463-});
464-expect(listed).toBe(true);
465-});
466-467-it("returns false when the label is missing", async () => {
468-state.listOutput = "123 0 com.other.service\n";
469-const listed = await isLaunchAgentListed({
470-env: { HOME: "/Users/test", OPENCLAW_PROFILE: "default" },
471-});
472-expect(listed).toBe(false);
473-});
474-475456it("parses stale OpenClaw updater jobs from launchctl list", () => {
476457const jobs = parseLaunchctlListOpenClawUpdateJobs(
477458[
@@ -542,24 +523,6 @@ describe("launchctl list detection", () => {
542523},
543524);
544525545-it("recognizes only OpenClaw updater launchd labels", () => {
546-expect(isOpenClawUpdateLaunchdLabel("ai.openclaw.update.2026.5.12")).toBe(true);
547-expect(isOpenClawUpdateLaunchdLabel("ai.openclaw.manual-update.1717168800")).toBe(true);
548-expect(isOpenClawUpdateLaunchdLabel("ai.openclaw.gateway")).toBe(false);
549-expect(isOpenClawUpdateLaunchdLabel("ai.openclaw.manual-update.gateway")).toBe(false);
550-expect(isOpenClawUpdateLaunchdLabel("ai.openclaw.manual-update.profile")).toBe(false);
551-expect(isOpenClawUpdateLaunchdLabel("ai.openclaw.manual-updater.1717168800")).toBe(false);
552-expect(isOpenClawUpdateLaunchdLabel("com.example.update")).toBe(false);
553-});
554-555-it.runIf(process.platform === "darwin")("removes legacy updater launchd jobs", async () => {
556-await expect(removeOpenClawUpdateLaunchdJob(" ai.openclaw.update.2026.5.12 ")).resolves.toBe(
557-true,
558-);
559-560-expect(state.launchctlCalls).toContainEqual(["remove", "ai.openclaw.update.2026.5.12"]);
561-});
562-563526it.runIf(process.platform === "darwin")(
564527"disables the current legacy updater launchd job",
565528async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。