Skip to content

Commit

Permalink
Revert "feat(table): set --print if stdout is not a terminal (#762)" (#…
Browse files Browse the repository at this point in the history
…811)

This reverts commit 05614c8.
  • Loading branch information
caarlos0 authored Jan 22, 2025
1 parent 2da9527 commit 2846d19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions table/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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...).
Expand Down

0 comments on commit 2846d19

Please sign in to comment.