mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
console: fixup clearHistory
This commit is contained in:
parent
c79f7a46e7
commit
1225817cfc
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue