mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-26 09:21:55 +00:00
refactor(cli): separate json payload output from logging
This commit is contained in:
@@ -86,14 +86,10 @@ export function registerSecurityCli(program: Command) {
|
||||
});
|
||||
|
||||
if (opts.json) {
|
||||
defaultRuntime.log(
|
||||
JSON.stringify(
|
||||
fixResult
|
||||
? { fix: fixResult, report, secretDiagnostics }
|
||||
: { ...report, secretDiagnostics },
|
||||
null,
|
||||
2,
|
||||
),
|
||||
defaultRuntime.writeJson(
|
||||
fixResult
|
||||
? { fix: fixResult, report, secretDiagnostics }
|
||||
: { ...report, secretDiagnostics },
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user