add error handling back

This commit is contained in:
Vendicated 2024-07-19 20:43:23 +02:00
parent 8fa7d006a4
commit 22fdde6e39
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -296,6 +296,17 @@ export async function buildOrWatchAll() {
const contexts = await Promise.all(builds.map(context)); const contexts = await Promise.all(builds.map(context));
await Promise.all(contexts.map(ctx => ctx.watch())); await Promise.all(contexts.map(ctx => ctx.watch()));
} else { } else {
await Promise.all(builds.map(build)); try {
await Promise.all(builds.map(build));
} catch (err) {
const reason = err instanceof Error
? err.message
: err;
console.error("Build failed");
console.error(reason);
// make ci fail
process.exitCode = 1;
}
} }
} }