forked from TrueCloudLab/distribution
Merge pull request #2460 from robermorales/patch-1
Improve error message in case invalid env var found
This commit is contained in:
commit
cc4627fc6e
1 changed files with 1 additions and 0 deletions
|
@ -206,6 +206,7 @@ func (p *Parser) overwriteStruct(v reflect.Value, fullpath string, path []string
|
||||||
fieldVal := reflect.New(sf.Type)
|
fieldVal := reflect.New(sf.Type)
|
||||||
err := yaml.Unmarshal([]byte(payload), fieldVal.Interface())
|
err := yaml.Unmarshal([]byte(payload), fieldVal.Interface())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
logrus.Warnf("Error parsing environment variable %s: %s", fullpath, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
field.Set(reflect.Indirect(fieldVal))
|
field.Set(reflect.Indirect(fieldVal))
|
||||||
|
|
Loading…
Reference in a new issue