From 7c481aae20a6cfc2e7d05999bed7e8b81dfa68b2 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 4 Sep 2024 18:44:07 +0200 Subject: [PATCH] fix lint.PrintLintViolations signature change Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- commands/build.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/build.go b/commands/build.go index 049f19e0..274209fd 100644 --- a/commands/build.go +++ b/commands/build.go @@ -909,7 +909,7 @@ func printResult(w io.Writer, f *controllerapi.CallFunc, res map[string]string) fmt.Fprintf(w, "Check complete, %s\n", warningCountMsg) } - err := printValue(w, lint.PrintLintViolations, lint.SubrequestLintDefinition.Version, f.Format, res) + err := printValue(w, printLintViolationsWrapper, lint.SubrequestLintDefinition.Version, f.Format, res) if err != nil { return 0, err } @@ -968,6 +968,11 @@ func printValue(w io.Writer, printer callFunc, version string, format string, re return printer([]byte(res["result.json"]), w) } +// FIXME: remove once https://github.com/docker/buildx/pull/2672 is sorted +func printLintViolationsWrapper(dt []byte, w io.Writer) error { + return lint.PrintLintViolations(dt, w, nil) +} + type invokeConfig struct { controllerapi.InvokeConfig onFlag string