Skip to content

Commit 43ccb03

Browse files
authored
Search for config file also in /data and /server (#49)
1 parent 7f9723a commit 43ccb03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/root.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ func initConfig() {
8989
viper.SetConfigFile(cfgFile)
9090
} else {
9191
viper.SetConfigName(".rcon-cli") // name of config file (without extension)
92-
viper.AddConfigPath("$HOME") // adding home directory as first search path
92+
viper.AddConfigPath("$HOME")
93+
viper.AddConfigPath("/data")
94+
viper.AddConfigPath("/server")
9395
}
9496

9597
// This will allow for env vars like RCON_PORT

0 commit comments

Comments
 (0)