forked from Mirrors/bubbletea
fix: don't check terminal size if we're not writing to a terminal
This commit is contained in:
parent
6301f93cb2
commit
2296184dc5
2
tea.go
2
tea.go
|
@ -439,7 +439,7 @@ func (p *Program) StartReturningModel() (Model, error) {
|
|||
defer close(readLoopDone)
|
||||
}
|
||||
|
||||
if f, ok := p.output.(*os.File); ok {
|
||||
if f, ok := p.output.(*os.File); ok && isatty.IsTerminal(f.Fd()) {
|
||||
// Get the initial terminal size and send it to the program.
|
||||
go func() {
|
||||
w, h, err := term.GetSize(int(f.Fd()))
|
||||
|
|
Loading…
Reference in New Issue