From 0959d26d69246bf6c298a4353f232224938d1530 Mon Sep 17 00:00:00 2001 From: harryrford Date: Thu, 6 Jun 2019 11:59:36 -0700 Subject: [PATCH] cmd/puppeth: add error for config flush --- cmd/puppeth/wizard.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/puppeth/wizard.go b/cmd/puppeth/wizard.go index 83536506c4..3b3c4e316c 100644 --- a/cmd/puppeth/wizard.go +++ b/cmd/puppeth/wizard.go @@ -63,7 +63,10 @@ func (c config) servers() []string { func (c config) flush() { os.MkdirAll(filepath.Dir(c.path), 0755) - out, _ := json.MarshalIndent(c, "", " ") + out, err := json.MarshalIndent(c, "", " ") + if err != nil { + log.Crit("Failed to read puppeth configs", "err", err) + } if err := ioutil.WriteFile(c.path, out, 0644); err != nil { log.Warn("Failed to save puppeth configs", "file", c.path, "err", err) }