mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-02 23:46:20 +00:00
fix(update): carry candidate plugin API version through doctor
This commit is contained in:
@@ -2365,12 +2365,21 @@ describe("update-cli", () => {
|
||||
termination: "exit",
|
||||
};
|
||||
});
|
||||
readPackageVersion.mockImplementation(async (packageRoot: string) => {
|
||||
const manifest = JSON.parse(
|
||||
await fs.readFile(path.join(packageRoot, "package.json"), "utf-8"),
|
||||
) as { version?: string };
|
||||
return manifest.version ?? "0.0.0";
|
||||
});
|
||||
|
||||
await updateCommand({ yes: true });
|
||||
|
||||
const doctorCall = doctorCommandCall();
|
||||
expect(doctorCall?.[0].slice(1)).toEqual([entryPath, "doctor", "--non-interactive", "--fix"]);
|
||||
expect(doctorCall?.[1].cwd).toBe(pkgRoot);
|
||||
expect(
|
||||
(doctorCall?.[1].env as NodeJS.ProcessEnv | undefined)?.OPENCLAW_COMPATIBILITY_HOST_VERSION,
|
||||
).toBe("2026.5.14");
|
||||
expect(defaultRuntime.exit).not.toHaveBeenCalledWith(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user