mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
fix(config): better configuration errors using viper.UnmarshalExact() (#2050)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
bdf6d23863
commit
60eaf7b5d9
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue