From 201efbd07fa21fb7e4605cb0ac55272ed7f32278 Mon Sep 17 00:00:00 2001 From: Cynthia Long Date: Wed, 18 Mar 2026 14:44:07 +0000 Subject: [PATCH] update comment --- packages/cli/src/ui/utils/ConsolePatcher.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/ui/utils/ConsolePatcher.ts b/packages/cli/src/ui/utils/ConsolePatcher.ts index 1ba00cda13..ddd26fca0b 100644 --- a/packages/cli/src/ui/utils/ConsolePatcher.ts +++ b/packages/cli/src/ui/utils/ConsolePatcher.ts @@ -57,14 +57,12 @@ export class ConsolePatcher { return; } } - // When it is stderr only mode, all console output redirect to stderr - // if it is debug mode. - if (this.params.stderr) { - if (type !== 'debug' || this.params.debugMode) { + // When it is in the debug mode, redirect console output to stderr + // depending on if it is stderr only mode. + if (type !== 'debug' || this.params.debugMode) { + if (this.params.stderr) { this.originalConsoleError(this.formatArgs(args)); - } - } else { - if (type !== 'debug' || this.params.debugMode) { + } else { this.params.onNewMessage?.({ type, content: this.formatArgs(args),