diff options
Diffstat (limited to 'vendor/github.com/spf13/cobra/cobra/cmd/root.go')
-rw-r--r-- | vendor/github.com/spf13/cobra/cobra/cmd/root.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/root.go b/vendor/github.com/spf13/cobra/cobra/cmd/root.go index 065c8bf40..32386ace4 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/root.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/root.go @@ -61,9 +61,9 @@ func initConfig() { viper.SetConfigFile(cfgFile) } - viper.SetConfigName(".cobra") // name of config file (without extension) - viper.AddConfigPath("$HOME") // adding home directory as first search path - viper.AutomaticEnv() // read in environment variables that match + viper.SetConfigName(".cobra") // name of config file (without extension) + viper.AddConfigPath(os.Getenv("HOME")) // adding home directory as first search path + viper.AutomaticEnv() // read in environment variables that match // If a config file is found, read it in. if err := viper.ReadInConfig(); err == nil { |