mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-31 11:51:22 +00:00
fix(plugins): make Matrix recovery paths tolerate stale plugin config (#52899)
This commit is contained in:
committed by
Peter Steinberger
parent
5c9e4cd30a
commit
3ae100a8d7
@@ -144,6 +144,12 @@ describe("ensureConfigReady", () => {
|
||||
expect(gatewayRuntime.exit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not exit for invalid config on plugins install", async () => {
|
||||
setInvalidSnapshot();
|
||||
const runtime = await runEnsureConfigReady(["plugins", "install"]);
|
||||
expect(runtime.exit).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("runs doctor migration flow only once per module instance", async () => {
|
||||
const runtimeA = makeRuntime();
|
||||
const runtimeB = makeRuntime();
|
||||
|
||||
@@ -15,6 +15,7 @@ const ALLOWED_INVALID_GATEWAY_SUBCOMMANDS = new Set([
|
||||
"stop",
|
||||
"restart",
|
||||
]);
|
||||
const ALLOWED_INVALID_PLUGINS_SUBCOMMANDS = new Set(["install"]);
|
||||
let didRunDoctorConfigFlow = false;
|
||||
let configSnapshotPromise: Promise<Awaited<ReturnType<typeof readConfigFileSnapshot>>> | null =
|
||||
null;
|
||||
@@ -76,7 +77,10 @@ export async function ensureConfigReady(params: {
|
||||
? ALLOWED_INVALID_COMMANDS.has(commandName) ||
|
||||
(commandName === "gateway" &&
|
||||
subcommandName &&
|
||||
ALLOWED_INVALID_GATEWAY_SUBCOMMANDS.has(subcommandName))
|
||||
ALLOWED_INVALID_GATEWAY_SUBCOMMANDS.has(subcommandName)) ||
|
||||
(commandName === "plugins" &&
|
||||
subcommandName &&
|
||||
ALLOWED_INVALID_PLUGINS_SUBCOMMANDS.has(subcommandName))
|
||||
: false;
|
||||
const { formatConfigIssueLines } = await import("../../config/issue-format.js");
|
||||
const issues =
|
||||
|
||||
Reference in New Issue
Block a user