We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11a4ba6 commit 3a159bcCopy full SHA for 3a159bc
internal/output/capabilities.go
@@ -23,11 +23,11 @@ func detectCapabilities() capabilities {
23
// Pulling in termbox is probably overkill, but finding a pure Go library
24
// that could just provide terminfo was surprisingly hard. At least termbox
25
// is widely used.
26
- if err := termbox.Init(); err != nil {
27
- panic(err)
+ w, h := 80, 25
+ if err := termbox.Init(); err == nil {
28
+ w, h = termbox.Size()
29
+ termbox.Close()
30
}
- w, h := termbox.Size()
- termbox.Close()
31
32
atty := isatty.IsTerminal(os.Stdout.Fd())
33
0 commit comments