From fc568209f073b9d775a09e0dbb8289cf9e5749bf Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 27 Dec 2019 20:08:58 +0100 Subject: termui: fix an excessive assumption about an error --- termui/termui.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'termui/termui.go') diff --git a/termui/termui.go b/termui/termui.go index 67f91280..9b92b536 100644 --- a/termui/termui.go +++ b/termui/termui.go @@ -67,7 +67,9 @@ func Run(cache *cache.RepoCache) error { err := <-ui.gError if err != nil && err != gocui.ErrQuit { - fmt.Println(err.(*errors2.Error).ErrorStack()) + if e, ok := err.(*errors2.Error); ok { + fmt.Println(e.ErrorStack()) + } return err } -- cgit