diff --git a/console/console.go b/console/console.go index aa9562cfc6..a7fa287d11 100644 --- a/console/console.go +++ b/console/console.go @@ -217,11 +217,10 @@ func (c *Console) init(preload []string) error { return nil } -func (c *Console) clearHistory() { +func (c *Console) clearHistory() (err error) { c.history = nil c.prompter.ClearHistory() - os.Remove(c.histPath) - fmt.Fprintf(c.printer, "history cleared\n") + return os.Remove(c.histPath) } // consoleOutput is an override for the console.log and console.error methods to