mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 19:32:27 +00:00
fix: keep status --json stdout clean (#52449) (thanks @cgdusek)
This commit is contained in:
@@ -352,8 +352,8 @@ describe("registerPreActionHooks", () => {
|
||||
});
|
||||
|
||||
await runPreAction({
|
||||
parseArgv: ["agents"],
|
||||
processArgv: ["node", "openclaw", "agents", "--json"],
|
||||
parseArgv: ["agents", "list"],
|
||||
processArgv: ["node", "openclaw", "agents", "list", "--json"],
|
||||
});
|
||||
|
||||
expect(ensurePluginRegistryLoadedMock).toHaveBeenCalled();
|
||||
@@ -369,8 +369,8 @@ describe("registerPreActionHooks", () => {
|
||||
});
|
||||
|
||||
await runPreAction({
|
||||
parseArgv: ["agents"],
|
||||
processArgv: ["node", "openclaw", "agents"],
|
||||
parseArgv: ["agents", "list"],
|
||||
processArgv: ["node", "openclaw", "agents", "list"],
|
||||
});
|
||||
|
||||
expect(ensurePluginRegistryLoadedMock).toHaveBeenCalled();
|
||||
|
||||
@@ -139,7 +139,6 @@ export function registerPreActionHooks(program: Command, programVersion: string)
|
||||
commandPath,
|
||||
...(jsonOutputMode ? { suppressDoctorStdout: true } : {}),
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
// Load plugins for commands that need channel access.
|
||||
// When --json output is active, temporarily route logs to stderr so plugin
|
||||
// registration messages don't corrupt the JSON payload on stdout.
|
||||
|
||||
Reference in New Issue
Block a user