From e475944a901af5133d2f8ebcd9d09b6c50eb6ecf Mon Sep 17 00:00:00 2001 From: Faissal Elamraoui Date: Sat, 31 Dec 2016 11:23:32 +0100 Subject: [PATCH] Adds current working directory as config path --- cobra/cmd/root.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cobra/cmd/root.go b/cobra/cmd/root.go index 065c8bf4..ca288a5a 100644 --- a/cobra/cmd/root.go +++ b/cobra/cmd/root.go @@ -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.