Revert "feat(table): set --print if stdout is not a terminal (#762)" (#811)

This reverts commit 05614c8196.
This commit is contained in:
Carlos Alexandro Becker 2025-01-22 11:18:53 -03:00 committed by GitHub
commit 2846d19b70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,6 @@ import (
"github.com/charmbracelet/gum/style"
"github.com/charmbracelet/lipgloss"
ltable "github.com/charmbracelet/lipgloss/table"
"github.com/charmbracelet/x/term"
"golang.org/x/text/encoding"
"golang.org/x/text/encoding/unicode"
"golang.org/x/text/transform"
@ -110,7 +109,7 @@ func (o Options) Run() error {
rows = append(rows, table.Row(data[row]))
}
if o.Print || !term.IsTerminal(os.Stdout.Fd()) {
if o.Print {
table := ltable.New().
Headers(columnNames...).
Rows(data...).