summaryrefslogtreecommitdiff
path: root/internal/config/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/state.go')
-rw-r--r--internal/config/state.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/config/state.go b/internal/config/state.go
index 1364fb84e..17fd31e2a 100644
--- a/internal/config/state.go
+++ b/internal/config/state.go
@@ -133,6 +133,12 @@ func (st *ConfigState) reloadFromViper() {
if err := st.viper.Unmarshal(&st.config, func(c *mapstructure.DecoderConfig) {
c.TagName = "name"
c.ZeroFields = true // empty the config struct before we marshal values into it
+
+ oldhook := c.DecodeHook
+ c.DecodeHook = mapstructure.ComposeDecodeHookFunc(
+ mapstructure.TextUnmarshallerHookFunc(),
+ oldhook,
+ )
}); err != nil {
panic(err)
}