From 3a2077108006c6809acdc26c227de13c7347dc86 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:58:27 +0100 Subject: [PATCH] bake: correctly match error when parsing definition Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/buildx/bake.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buildx/bake.ts b/src/buildx/bake.ts index 7b96693..4c47dae 100644 --- a/src/buildx/bake.ts +++ b/src/buildx/bake.ts @@ -77,7 +77,7 @@ export class Bake { silent: true }).then(res => { if (res.stderr.length > 0 && res.exitCode != 0) { - throw new Error(res.stderr); + throw new Error(`cannot parse bake definitions: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); } return JSON.parse(res.stdout.trim()); });