summaryrefslogtreecommitdiffstats
path: root/pkg/terminal/terminal.go
diff options
context:
space:
mode:
authorSergey Grebenshchikov <sgreben@gmail.com>2018-03-30 15:16:54 +0200
committerSergey Grebenshchikov <sgreben@gmail.com>2018-03-30 15:16:54 +0200
commite95edd478ddb5c796033772edaeee0e3adbe9ecf (patch)
tree581c9c2017314a5a2281d4b931e319edc1111e9a /pkg/terminal/terminal.go
parentd9d6da484640d23fd88e0323ea3b80d14981d3fa (diff)
Gracefully handle non-tty stdout1.1.5
Diffstat (limited to 'pkg/terminal/terminal.go')
-rw-r--r--pkg/terminal/terminal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/terminal/terminal.go b/pkg/terminal/terminal.go
index 207275d..d15acee 100644
--- a/pkg/terminal/terminal.go
+++ b/pkg/terminal/terminal.go
@@ -31,7 +31,7 @@ func Width() int {
col, _, err := getWinsize()
if err != nil {
- return -1
+ return 79
}
return col
@@ -40,7 +40,7 @@ func Width() int {
func Height() int {
_, row, err := getWinsize()
if err != nil {
- return -1
+ return 24
}
return row
}