Skip to content

Commit

Permalink
refactor: use CheckTTYSupport for terminal detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerebrovinny committed Jan 16, 2025
1 parent 2ede63c commit f2b5c8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/tui/templates/term/term_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"io"
"os"

"github.com/cloudposse/atmos/internal/exec"
"github.com/mitchellh/go-wordwrap"
"golang.org/x/term"
)
Expand All @@ -30,7 +31,7 @@ func NewResponsiveWriter(w io.Writer) io.Writer {
return w
}

if !term.IsTerminal(int(file.Fd())) {
if !exec.CheckTTYSupport() {
return w
}

Expand Down

0 comments on commit f2b5c8d

Please sign in to comment.