mirror of
https://github.com/spf13/cobra
synced 2024-11-24 22:57:12 +00:00
Adds current working directory as config path
This commit is contained in:
parent
1dd5ff2e11
commit
e475944a90
1 changed files with 1 additions and 0 deletions
|
@ -63,6 +63,7 @@ func initConfig() {
|
|||
|
||||
viper.SetConfigName(".cobra") // name of config file (without extension)
|
||||
viper.AddConfigPath("$HOME") // adding home directory as first search path
|
||||
viper.AddConfigPath(".") // optionally look for config in working directory
|
||||
viper.AutomaticEnv() // read in environment variables that match
|
||||
|
||||
// If a config file is found, read it in.
|
||||
|
|
Loading…
Reference in a new issue