fix: default config file selection

close: #689
This commit is contained in:
Haruue Icymoon 2023-09-15 15:48:29 +08:00
parent c73570f582
commit 1965535e69
No known key found for this signature in database
GPG Key ID: F6083B28CBCBC148

View File

@ -120,9 +120,10 @@ func initConfig() {
} else {
viper.SetConfigName("config")
viper.SetConfigType("yaml")
viper.AddConfigPath("/etc/hysteria/")
viper.AddConfigPath("$HOME/.hysteria")
viper.SupportedExts = append([]string{"yaml", "yml"}, viper.SupportedExts...)
viper.AddConfigPath(".")
viper.AddConfigPath("$HOME/.hysteria")
viper.AddConfigPath("/etc/hysteria/")
}
}