Skip to content
Myr

fix: don't check terminal size if we're not writing to a terminal

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Muehlhaeuser · committed by Christian Rocha · parent 6301f93 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:tea.go+1 added-1 removed
437 unmodified lines
438 } else {439 defer close(readLoopDone)440 }441442 if f, ok := p.output.(*os.File); ok {442 if f, ok := p.output.(*os.File); ok && isatty.IsTerminal(f.Fd()) {443 // Get the initial terminal size and send it to the program.444 go func() {445 w, h, err := term.GetSize(int(f.Fd()))446 if err != nil {
246 unmodified lines