Skip to content

Commit

Permalink
Merge pull request #225 from crazy-max/fix-bake-error
Browse files Browse the repository at this point in the history
bake: correctly match error when parsing definition
  • Loading branch information
crazy-max committed Dec 21, 2023
2 parents 5430d01 + 3a20771 commit a99fb34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/buildx/bake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <BakeDefinition>JSON.parse(res.stdout.trim());
});
Expand Down

0 comments on commit a99fb34

Please sign in to comment.