From e28c015aa46b6899e6bea858156ab56cc1b96f41 Mon Sep 17 00:00:00 2001 From: Jesse Schmidt Date: Thu, 1 Feb 2024 16:10:51 -0800 Subject: [PATCH] only log config file if loaded --- cmd/root.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index c51c7b3..9bcb62e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -43,7 +43,9 @@ func newRootCmd() *cobra.Command { multiErr = errors.Join(multiErr, err) } - logger.Infof("Using config file: %s", cfgFile) + if cfgFile != "" { + logger.Infof("Using config file: %s", cfgFile) + } lvl, err := cmd.Flags().GetString("log-level") if err != nil {