We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 927fb67 commit 366328bCopy full SHA for 366328b
commands/build.go
@@ -878,6 +878,12 @@ func printResult(f *controllerapi.PrintFunc, res map[string]string) error {
878
}
879
880
if lintResults.Error != nil {
881
+ // Print the error message and the source
882
+ // Normally, we would use `errdefs.WithSource` to attach the source to the
883
+ // error and let the error be printed by the handling that's already in place,
884
+ // but here we want to print the error in a way that's consistent with how
885
+ // the lint warnings are printed via the `lint.PrintLintViolations` function,
886
+ // which differs from the default error printing.
887
fmt.Println()
888
lintBuf := bytes.NewBuffer([]byte(lintResults.Error.Message + "\n"))
889
sourceInfo := lintResults.Sources[lintResults.Error.Location.SourceIndex]
0 commit comments