From 1225817cfc914bf5ce2c98a5dcd8537cb81c1b14 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 8 Dec 2017 11:56:47 +0100 Subject: [PATCH] console: fixup clearHistory --- console/console.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/console/console.go b/console/console.go index a7fa287d11..1ecbfd0b0f 100644 --- a/console/console.go +++ b/console/console.go @@ -217,10 +217,14 @@ func (c *Console) init(preload []string) error { return nil } -func (c *Console) clearHistory() (err error) { +func (c *Console) clearHistory() { c.history = nil c.prompter.ClearHistory() - return os.Remove(c.histPath) + if err := os.Remove(c.histPath); err != nil { + fmt.Fprintln(c.printer, "can't delete history file:", err) + } else { + fmt.Fprintln(c.printer, "history file deleted") + } } // consoleOutput is an override for the console.log and console.error methods to