Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tools/cdk-build-tools/lib/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import { Timers } from "./timer";
* Run the compiler on the current package
*/
export async function compileCurrentPackage(timers: Timers, compilers: CompilerOverrides = {}): Promise<void> {
await shell(packageCompiler(compilers), timers);
const stdout = await shell(packageCompiler(compilers), timers);

// WORKAROUND: jsii 0.8.2 does not exit with non-zero on compilation errors
// until this is released: https://github.com/awslabs/jsii/pull/442
if (stdout.trim()) {
throw new Error(`Compilation failed`);
}

// Find files in bin/ that look like they should be executable, and make them so.
const scripts = currentPackageJson().bin || {};
Expand Down