Skip to content

Commit 4b4eeca

Browse files
committed
build: Preserve newlines when gathering stdout
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)
1 parent 3f70426 commit 4b4eeca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build-schema.mts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function _exec(cmd: string, captureStdout: boolean): Promise<string> {
3838
proc.stdout.on('data', (data) => {
3939
console.info(data.toString().trim());
4040
if (captureStdout) {
41-
output += data.toString().trim();
41+
output += data.toString();
4242
}
4343
});
4444
proc.stderr.on('data', (data) => console.info(data.toString().trim()));

0 commit comments

Comments
 (0)