Skip to content

Commit

Permalink
build: Preserve newlines when gathering stdout
Browse files Browse the repository at this point in the history
If the chunk happens to end in a new line or other meaningful
whitespace, stripping it can lead to two words (e.g. targets)
being squished together and broken.

(cherry picked from commit c48a2da)
  • Loading branch information
jkrems committed Feb 3, 2025
1 parent 3f70426 commit 4b4eeca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build-schema.mts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function _exec(cmd: string, captureStdout: boolean): Promise<string> {
proc.stdout.on('data', (data) => {
console.info(data.toString().trim());
if (captureStdout) {
output += data.toString().trim();
output += data.toString();
}
});
proc.stderr.on('data', (data) => console.info(data.toString().trim()));
Expand Down

0 comments on commit 4b4eeca

Please sign in to comment.