build: fix builds not failing with compilation errors in unit tests (#9248)

Fixes the CI continuing to run even though it failed to compile, due to a couple of promises that weren't rejecting properly. This should avoids things like #9073 slipping through.
This commit is contained in:
Kristiyan Kostadinov
2018-01-05 22:28:19 +02:00
committed by Jeremy Elbourn
parent b6da765d11
commit 6777427cc6
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -107,6 +107,7 @@ export class BuildPackage {
return ngcCompile(['-p', entryPointTsconfigPath]).catch(() => {
const error = red(`Failed to compile ${secondaryEntryPoint} using ${entryPointTsconfigPath}`);
console.error(error);
return Promise.reject(error);
});
}
@@ -22,6 +22,7 @@ export async function compileEntryPoint(buildPackage: BuildPackage, tsconfigName
return ngcCompile(ngcFlags).catch(() => {
const error = red(`Failed to compile ${secondaryEntryPoint} using ${entryPointTsconfigPath}`);
console.error(error);
return Promise.reject(error);
});
}