diff --git a/viper.go b/viper.go index 6c1bcae..dfdd2e1 100644 --- a/viper.go +++ b/viper.go @@ -2105,6 +2105,11 @@ func (v *Viper) getConfigFile() (string, error) { return v.configFile, nil } +// GetConfigFilePath returns the path where Viper actually found the configfile it uses. +func GetConfigFilePath() (string, error) { + return v.getConfigFile() +} + func (v *Viper) searchInPath(in string) (filename string) { jww.DEBUG.Println("Searching for config in ", in) for _, ext := range SupportedExts {