mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 11:09:17 -07:00
fix: don't check terminal size if we're not writing to a terminal
This commit is contained in:
committed by
Christian Rocha
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()))
|
||||
|
||||
Reference in New Issue
Block a user