termui: fix an excessive assumption about an error

This commit is contained in:
Michael Muré 2019-12-27 20:08:58 +01:00
parent 1bcba473fb
commit fc568209f0
No known key found for this signature in database
GPG Key ID: A4457C029293126F

View File

@ -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
}