Skip to content

Commit

Permalink
chore: improve codegen error output (#17873)
Browse files Browse the repository at this point in the history
* chore: improve codegen error output

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* remove accidental file

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
  • Loading branch information
crenshaw-dev and pasha-codefresh committed Apr 18, 2024
1 parent 1f8acf4 commit 1e35e68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hack/gen-crd-spec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"encoding/json"
"errors"
"fmt"
"os"
"os/exec"
Expand Down Expand Up @@ -117,6 +118,10 @@ func removeDescription(v interface{}) {

func checkErr(err error) {
if err != nil {
var execError *exec.ExitError
if errors.As(err, &execError) {
fmt.Println(string(execError.Stderr))
}
panic(err)
}
}
Expand Down

0 comments on commit 1e35e68

Please sign in to comment.