From 509e5d81a1b1786db100f2b1612cba1a5c9245b8 Mon Sep 17 00:00:00 2001 From: Justin Overfelt Date: Tue, 7 May 2019 16:12:16 -0400 Subject: [PATCH] allow graceful fallback when we don't have an alternate screen --- cui/cui.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cui/cui.go b/cui/cui.go index a851764..f02ba14 100644 --- a/cui/cui.go +++ b/cui/cui.go @@ -163,8 +163,9 @@ func HandleAlternateScreen(opt string) { cmd := exec.Command("tput", opt) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout - err := cmd.Run() - if err != nil { - panic(err) - } + // explicitly ignoring the error here as + // the alternate screen is an optional feature + // that may not be available everywhere we expect + // to run + _ = cmd.Run() }