From 43ccb0311317dba9a99dd4836e4a274fbf993492 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 25 Nov 2023 18:07:27 -0600 Subject: [PATCH] Search for config file also in /data and /server (#49) --- cmd/root.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 46d9a15..534a995 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -89,7 +89,9 @@ func initConfig() { viper.SetConfigFile(cfgFile) } else { viper.SetConfigName(".rcon-cli") // name of config file (without extension) - viper.AddConfigPath("$HOME") // adding home directory as first search path + viper.AddConfigPath("$HOME") + viper.AddConfigPath("/data") + viper.AddConfigPath("/server") } // This will allow for env vars like RCON_PORT