pkg/terminal: Improve error when unable to read history file (#3169)

This patch includes the path to the history file itself so that
users can better fix the issue when an error arises.

Fixes #3168
This commit is contained in:
Derek Parker
2022-10-28 05:42:06 -07:00
committed by GitHub
parent 95a151379b
commit 63ef73a0dd

View File

@ -292,7 +292,7 @@ func (t *Term) Run() (int, error) {
fmt.Printf("Unable to open history file: %v. History will not be saved for this session.", err)
}
if _, err := t.line.ReadHistory(t.historyFile); err != nil {
fmt.Printf("Unable to read history file: %v", err)
fmt.Printf("Unable to read history file %s: %v\n", fullHistoryFile, err)
}
fmt.Println("Type 'help' for list of commands.")