From 22fdde6e392ce7a6e0a64612539b5a53770c14c0 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 19 Jul 2024 20:43:23 +0200 Subject: [PATCH] add error handling back --- scripts/build/common.mts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/build/common.mts b/scripts/build/common.mts index 495db5a363..c413e5cd03 100644 --- a/scripts/build/common.mts +++ b/scripts/build/common.mts @@ -296,6 +296,17 @@ export async function buildOrWatchAll() { const contexts = await Promise.all(builds.map(context)); await Promise.all(contexts.map(ctx => ctx.watch())); } 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; + } } }