Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bake: format hcl errors with source definition #391

Merged
merged 1 commit into from
Sep 20, 2020

Conversation

tonistiigi
Copy link
Member

depends on #389

Extend typed errors support to cover bake errors from the client side:

/work/hello # docker buildx bake
docker-bake.hcl:3
--------------------
   1 |     target "binary" {
   2 |       target = "bin"
   3 | >>>   plat forms = ["local"]
   4 |       output = ["type=local,dest=bin/"]
   5 |     }
--------------------
error: docker-bake.hcl:3,14-15: Invalid block definition; The equals sign "=" indicates an argument definition, and must not be used when defining a block.

/work/hello # docker buildx bake --print -f docker-bake.json foo
docker-bake.json:3
--------------------
   1 |     {
   2 |     	"target": {
   3 | >>> 		"foo": {},
   4 |     	}
   5 |     }
--------------------
error: docker-bake.json:3,14-15: Trailing comma in object; JSON does not permit a trailing comma after the final property in an object.

@tonistiigi tonistiigi merged commit ac2e081 into docker:master Sep 20, 2020
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.

2 participants