Skip to content

Commit

Permalink
fix lint.PrintLintViolations signature change
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Sep 4, 2024
1 parent 7bea00f commit 7c481aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7c481aa

Please sign in to comment.