mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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
This commit is contained in:
committed by
Jeremy Elbourn
parent
efd29932ca
commit
74fdedba56
@@ -16,6 +16,8 @@ export function tsCompile(binary: 'tsc' | 'ngc', flags: string[]) {
|
||||
// Pipe stdout and stderr from the child process.
|
||||
childProcess.stdout.on('data', (data: string|Buffer) => console.log(`${data}`));
|
||||
childProcess.stderr.on('data', (data: string|Buffer) => console.error(red(`${data}`)));
|
||||
childProcess.on('exit', (exitCode: number) => exitCode === 0 ? resolve() : reject());
|
||||
childProcess.on('exit', (exitCode: number) => {
|
||||
exitCode === 0 ? resolve() : reject(`${binary} compilation failure`);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user