Skip to content

Commit 74fdedb

Browse files
devversionjelbourn
authored andcommitted
build: ts compilation not reporting failures (#13312)
Currently if the TS compilation (either through `ngc` or `tsc`) fails, the gulp tasks won't report the error properly because the `reject()` call of the Promise does not have any error message. This causes compilation failures to be ignored. See: #13310
1 parent efd2993 commit 74fdedb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/package-tools/ts-compile.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export function tsCompile(binary: 'tsc' | 'ngc', flags: string[]) {
1616
// Pipe stdout and stderr from the child process.
1717
childProcess.stdout.on('data', (data: string|Buffer) => console.log(`${data}`));
1818
childProcess.stderr.on('data', (data: string|Buffer) => console.error(red(`${data}`)));
19-
childProcess.on('exit', (exitCode: number) => exitCode === 0 ? resolve() : reject());
19+
childProcess.on('exit', (exitCode: number) => {
20+
exitCode === 0 ? resolve() : reject(`${binary} compilation failure`);
21+
});
2022
});
2123
}

0 commit comments

Comments
 (0)