Skip to content

Commit

Permalink
Enables debug output when kubectl fails when checking if resources exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewis Marshall authored and lewismarshall committed Nov 23, 2018
1 parent ecbbc02 commit e2b626e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,10 @@ func checkResourceExist(c *cli.Context, r *ObjectResource) (bool, error) {
}
data, _ := ioutil.ReadAll(stdout)
if err := cmd.Wait(); err != nil {
logDebug.Printf("error with kubectl: %s", err)
logDebug.Printf(
"error with kubectl: %s. kubectl arguments: %q",
err,
strings.Join(cmd.Args, " "))
errData, _ := ioutil.ReadAll(stderr)
if strings.Contains("NotFound", string(errData[:])) {
return false, nil
Expand Down

0 comments on commit e2b626e

Please sign in to comment.