seedling: Don't swallow yaml config errors (#846)

* Don't swallow yaml config errors

because installation continues and there is no indication that something
went wrong

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Apply suggestions from code review

Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Signed-off-by: Dimitris Karakasilis <jimmykarily@gmail.com>

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <jimmykarily@gmail.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
Dimitris Karakasilis 2023-02-08 22:13:13 +02:00 committed by Itxaka
parent 84c68ff0b8
commit a09db09db7

View File

@ -355,7 +355,10 @@ func parseConfig(dir []string, nologs bool) *Config {
continue
}
yaml.Unmarshal(b, c) //nolint:errcheck
err = yaml.Unmarshal(b, c)
if err != nil && !nologs {
fmt.Printf("warning: failed to merge config:\n%s\n", err.Error())
}
var newYaml map[string]interface{}
yaml.Unmarshal(b, &newYaml) //nolint:errcheck