Skip to content

Commit

Permalink
Correctly measure terminal size in GH_FORCE_TTY=true mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Nov 2, 2022
1 parent 5d098ef commit e2cbba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/term/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (t Term) Size() (int, int, error) {
}

ttyOut := t.out
if !t.isTTY {
if ttyOut == nil || !IsTerminal(ttyOut) {
if f, err := openTTY(); err == nil {
defer f.Close()
ttyOut = f
Expand Down

0 comments on commit e2cbba4

Please sign in to comment.