mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 15:30:44 +00:00
fix: clarify gateway version mismatch warnings
This commit is contained in:
@@ -157,7 +157,7 @@ describe("printDaemonStatus", () => {
|
||||
expect(runtime.log).toHaveBeenCalledWith(expect.stringContaining("Capability: write-capable"));
|
||||
});
|
||||
|
||||
it("prints CLI and gateway versions with stale wrapper guidance when they differ", () => {
|
||||
it("prints CLI and gateway versions with readable guidance when they differ", () => {
|
||||
printDaemonStatus(
|
||||
{
|
||||
cli: {
|
||||
@@ -195,10 +195,12 @@ describe("printDaemonStatus", () => {
|
||||
);
|
||||
expect(runtime.log).toHaveBeenCalledWith(expect.stringContaining("Gateway version: 2026.5.6"));
|
||||
expect(runtime.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining("CLI/runtime version skew detected"),
|
||||
expect.stringContaining("this OpenClaw command is version 2026.4.23"),
|
||||
);
|
||||
expect(runtime.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining("stale PATH/global wrappers"),
|
||||
expect.stringContaining(
|
||||
"if this mismatch is unexpected, update PATH so `openclaw` points to the version you want",
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -193,12 +193,12 @@ export function printDaemonStatus(status: DaemonStatus, opts: { json: boolean })
|
||||
if (status.cli?.version && status.cli.version !== gatewayVersion) {
|
||||
defaultRuntime.error(
|
||||
warnText(
|
||||
`Warning: CLI/runtime version skew detected. CLI is ${status.cli.version}; gateway is ${gatewayVersion}.`,
|
||||
`Warning: this OpenClaw command is version ${status.cli.version}, but the running Gateway is version ${gatewayVersion}.`,
|
||||
),
|
||||
);
|
||||
defaultRuntime.error(
|
||||
warnText(
|
||||
`Fix: check for stale PATH/global wrappers with \`command -v openclaw\`, \`readlink -f "$(command -v openclaw)"\`, and \`openclaw --version\`; reinstall the gateway service from the intended binary if needed.`,
|
||||
"Check `openclaw --version`, `which openclaw`, and `openclaw gateway status --deep`; if this mismatch is unexpected, update PATH so `openclaw` points to the version you want, or reinstall the Gateway service from that same OpenClaw install.",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user