fix lint.PrintLintViolations signature change

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2024-09-04 18:44:07 +02:00
parent 7bea00f3dd
commit 7c481aae20
No known key found for this signature in database
GPG Key ID: ADE44D8C9D44FBE4
1 changed files with 6 additions and 1 deletions

View File

@ -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