Skip to content

Commit

Permalink
fix: do not use a renderer if output is not a tty
Browse files Browse the repository at this point in the history
the renderer will send sequences to clear screen, hide/show mouse, etc,
which will not work if output is not a tty.

fixes #198
fixes #86

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Jan 24, 2024
1 parent ab291d6 commit 446766f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var (
}

if !isInputTTY() {
opts = append(opts, tea.WithInput(nil))
opts = append(opts, tea.WithInput(nil), tea.WithoutRenderer())
}

if isNoArgs() && isInputTTY() {
Expand Down

0 comments on commit 446766f

Please sign in to comment.