1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

do not panic

This commit is contained in:
Ivan Mikushin
2015-08-20 18:06:48 +05:00
parent b0fb2ff875
commit aa1af05d46
4 changed files with 14 additions and 19 deletions

View File

@@ -168,8 +168,10 @@ func RunInit() error {
}
if cfg.Rancher.Debug {
cfgString, _ := config.Dump(false, true)
if cfgString != "" {
cfgString, err := config.Dump(false, true)
if err != nil {
log.WithFields(log.Fields{"err": err}).Error("Error serializing config")
} else {
log.Debugf("Config: %s", cfgString)
}
}