Skip to content

bake: correctly match error when parsing definition#225

Merged
crazy-max merged 1 commit intodocker:mainfrom
crazy-max:fix-bake-error
Dec 21, 2023
Merged

bake: correctly match error when parsing definition#225
crazy-max merged 1 commit intodocker:mainfrom
crazy-max:fix-bake-error

Conversation

@crazy-max
Copy link
Copy Markdown
Member

related to https://github.com/docker/bake-action/actions/runs/7274951418/job/19821919843#step:6:120

Currently when parsing definitions fails it would return an error but not on the correct line:

image

Error: #1 [internal] load local bake definitions
#1 reading ./test/config.hcl 623B / 623B done
#1 reading . 0B / 4.10kB done
#1 DONE 0.0s
ERROR: read .: is a directory

This change ensures we return the right line (here read .: is a directory) like we do in bake-action and build-push-action: https://github.com/docker/bake-action/blob/52a1696536aaa8818afd3753a71ec46298b8a19b/src/main.ts#L89

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max merged commit a99fb34 into docker:main Dec 21, 2023
@crazy-max crazy-max deleted the fix-bake-error branch December 21, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant