Skip to content

Commit

Permalink
Merge pull request #86 from cli/force-tty-measure-width
Browse files Browse the repository at this point in the history
Correctly measure terminal size in GH_FORCE_TTY mode
  • Loading branch information
mislav committed Nov 2, 2022
2 parents 5d098ef + e2cbba4 commit e3ec45f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/term/env.go
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 e3ec45f

Please sign in to comment.