Skip to content

Commit 3a20771

Browse files
committed
bake: correctly match error when parsing definition
Signed-off-by: CrazyMax <[email protected]>
1 parent 5430d01 commit 3a20771

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/buildx/bake.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class Bake {
7777
silent: true
7878
}).then(res => {
7979
if (res.stderr.length > 0 && res.exitCode != 0) {
80-
throw new Error(res.stderr);
80+
throw new Error(`cannot parse bake definitions: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
8181
}
8282
return <BakeDefinition>JSON.parse(res.stdout.trim());
8383
});

0 commit comments

Comments
 (0)