Skip to content

Commit 1130026

Browse files
kristof-siketclaude
andcommitted
fix(build): route stderr/error log records to stderr in human mode
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f38ccc7 commit 1130026

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/cli/src/controllers/build.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ function writeBuildLogRecord(
9595
}
9696

9797
if (record.type === "log") {
98-
context.output.stdout.write(record.text);
98+
const stream =
99+
record.source === "stderr" || record.level === "error"
100+
? context.output.stderr
101+
: context.output.stdout;
102+
stream.write(record.text);
99103
if (!record.text.endsWith("\n")) {
100-
context.output.stdout.write("\n");
104+
stream.write("\n");
101105
}
102106
return;
103107
}

0 commit comments

Comments
 (0)