Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 835ecc6ae26f76bf9aeb5fc1f7f613df4731d652 Author: Patrick Connolly <patrick.c.connolly@gmail.com> Date: Sat Nov 03 21:42:27 2018 +0000 Remove hyphens when auto-loading envvars from viper config (#545) * When auto-loading envvars from toml keys, remove hyphens. See: https://unix.stackexchange.com/questions/23659/can-shell-variable-include-character diff --git a/bridge/config/config.go b/bridge/config/config.go index eff9309..0e36d96 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -1867 +1867 @@ func NewConfig(cfgfile string) *Config {   viper.SetConfigFile(cfgfile)   viper.SetEnvPrefix("matterbridge")   viper.AddConfigPath(".") - viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) + viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))   viper.AutomaticEnv()   f, err := os.Open(cfgfile)   if err != nil {