From ecbf2b70f5003ab2947a1d45ddd28cd752c9b447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Apayd=C4=B1n?= Date: Sun, 26 Sep 2021 11:15:55 +0300 Subject: [PATCH] feat: make fmt.FPrintln instead of klog while printing error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Batuhan Apaydın --- cmd/krew/cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/krew/cmd/root.go b/cmd/krew/cmd/root.go index e8615113..6174b254 100644 --- a/cmd/krew/cmd/root.go +++ b/cmd/krew/cmd/root.go @@ -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) } } }