Skip to content

Commit

Permalink
Search for config file also in /data and /server (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Nov 26, 2023
1 parent 7f9723a commit 43ccb03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43ccb03

Please sign in to comment.