1
0
mirror of https://github.com/angular/angular-cli.git synced 2025-05-16 02:24:10 +08:00

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.
This commit is contained in:
Jan Martin 2025-02-03 12:33:51 -08:00 committed by Jan Olaf Martin
parent 7a8ff1f099
commit c48a2da287

@ -38,7 +38,7 @@ function _exec(cmd: string, captureStdout: boolean): Promise<string> {
proc.stdout.on('data', (data) => { proc.stdout.on('data', (data) => {
console.info(data.toString().trim()); console.info(data.toString().trim());
if (captureStdout) { if (captureStdout) {
output += data.toString().trim(); output += data.toString();
} }
}); });
proc.stderr.on('data', (data) => console.info(data.toString().trim())); proc.stderr.on('data', (data) => console.info(data.toString().trim()));