From 319870bc2ad8f5fe74cc141c2e6ef0a296f25f8e Mon Sep 17 00:00:00 2001 From: Thomas Taylor Date: Fri, 24 Jul 2026 15:28:46 +0100 Subject: [PATCH] Fix: report the failing grunt task/error instead of the full build transcript --- lib/integration/AdaptFramework/build.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/integration/AdaptFramework/build.js b/lib/integration/AdaptFramework/build.js index 25b0160..523f925 100644 --- a/lib/integration/AdaptFramework/build.js +++ b/lib/integration/AdaptFramework/build.js @@ -28,10 +28,17 @@ export default async function adaptBuild ({ ].filter(Boolean).join(' '); exec(cmd, { cwd }, (error, stdout, stderr) => { if(error || stderr) { - const matches = stdout.match(/>> Error:\s(.+)\s/); + // Surface the salient failure rather than the whole grunt transcript: + // a '>> Error:' task message, else a bare 'Error:' line (e.g. a rollup + // load failure from the javascript task), else the failing-task warning. + // Fall back to the full stdout only when none of those are present. + const matches = stdout.match(/>> Error:\s(.+)/) || + stdout.match(/^Error:\s(.+)/m) || + stdout.match(/(Warning: Task .+ failed)/); const e = new Error('grunt tasks failed') e.cmd = cmd; e.raw = matches?.[1] ?? stdout; + e.stdout = stdout; e.source = error; e.stderr = stderr; return reject(e)