From ba0337baca41a3d80f67c5fd5d2bb6a8f0a94837 Mon Sep 17 00:00:00 2001 From: catsby Date: Tue, 10 Sep 2024 09:11:04 -0500 Subject: [PATCH] chore: only show config file if there is one --- src/cmd/common/viper.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmd/common/viper.go b/src/cmd/common/viper.go index e161c22d00..1077b654a0 100644 --- a/src/cmd/common/viper.go +++ b/src/cmd/common/viper.go @@ -175,7 +175,9 @@ func printViperConfigUsed() { message.WarnErrf(vConfigError, lang.CmdViperErrLoadingConfigFile, vConfigError.Error()) return } - message.Notef(lang.CmdViperInfoUsingConfigFile, v.ConfigFileUsed()) + if cfgFile := v.ConfigFileUsed(); cfgFile != "" { + message.Notef(lang.CmdViperInfoUsingConfigFile, cfgFile) + } } func setDefaults() {