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

@@ -165,12 +165,12 @@ func configGet(c *cli.Context) {
cfg, err := config.LoadConfig()
if err != nil {
log.Panicln(err)
log.WithFields(log.Fields{"err": err}).Fatal("config get: failed to load config")
}
val, err := cfg.Get(arg)
if err != nil {
log.WithFields(log.Fields{"cfg": cfg, "arg": arg, "val": val}).Panicln(err)
log.WithFields(log.Fields{"cfg": cfg, "key": arg, "val": val, "err": err}).Fatal("config get: failed to retrieve value")
}
printYaml := false