Skip to content

Commit

Permalink
fix(config): better configuration errors using viper.UnmarshalExact() (
Browse files Browse the repository at this point in the history
…#2050)

Signed-off-by: Petu Eusebiu <[email protected]>
  • Loading branch information
eusebiu-constantin-petu-dbk authored Nov 16, 2023
1 parent bdf6d23 commit 60eaf7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cli/server/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ func LoadConfiguration(config *config.Config, configPath string) error {
}

metaData := &mapstructure.Metadata{}
if err := viperInstance.Unmarshal(&config, metadataConfig(metaData)); err != nil {
if err := viperInstance.UnmarshalExact(&config, metadataConfig(metaData)); err != nil {
log.Error().Err(err).Msg("error while unmarshaling new config")

return err
Expand Down

0 comments on commit 60eaf7b

Please sign in to comment.