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() {