fix adapter undefined

This commit is contained in:
LaZzyMan 2026-01-26 19:53:02 +08:00
parent 650c625d86
commit 8794678c62
6 changed files with 137 additions and 121 deletions

View file

@ -67,7 +67,7 @@ export class JsonOutputAdapter
);
this.messages.push(resultMessage);
if (options.showResult) {
if (this.config.getOutputFormat() === 'text') {
if (resultMessage.is_error) {
process.stderr.write(`${resultMessage.error?.message || ''}`);
} else {