Skip to content

Commit

Permalink
feat: make fmt.FPrintln instead of klog while printing error message
Browse files Browse the repository at this point in the history
Signed-off-by: Batuhan Apaydın <[email protected]>
  • Loading branch information
developer-guy committed Sep 26, 2021
1 parent b750994 commit ecbf2b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/krew/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ You can invoke krew through kubectl: "kubectl krew [command]..."`,
func Execute() {
if err := rootCmd.Execute(); err != nil {
if klog.V(1).Enabled() {
klog.Fatalf("%+v", err) // with stack trace
fmt.Fprintf(os.Stderr, "%+v\n", err) // with stack trace
} else {
klog.Fatal(err) // just error message
fmt.Fprintln(os.Stderr, err)
}
}
}
Expand Down

0 comments on commit ecbf2b7

Please sign in to comment.