Skip to content

Commit

Permalink
A bit more helpful error message on kubeval (non-lint) error
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed Jun 23, 2020
1 parent 80aefbb commit b47d723
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ func (r *Runner) Run() error {
var conftestOut KubevalOutput

if err := yaml.Unmarshal(out, &conftestOut); err != nil {
return err
fmt.Fprintf(os.Stderr, "kubeeval failed with output:\n%s", string(out))

return fmt.Errorf("unmarshalling yaml: %w", err)
}

for _, res := range conftestOut {
Expand Down

0 comments on commit b47d723

Please sign in to comment.