Skip to content

Commit a99fb34

Browse files
authored
Merge pull request #225 from crazy-max/fix-bake-error
bake: correctly match error when parsing definition
2 parents 5430d01 + 3a20771 commit a99fb34

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)