diff --git a/pkg/cmd/attestation/io/handler.go b/pkg/cmd/attestation/io/handler.go index 07be3d1df..9664c7f65 100644 --- a/pkg/cmd/attestation/io/handler.go +++ b/pkg/cmd/attestation/io/handler.go @@ -62,6 +62,10 @@ func (h *Handler) VerbosePrintf(f string, v ...interface{}) (int, error) { } func (h *Handler) PrintTable(headers []string, rows [][]string) error { + if !h.IO.IsStdoutTTY() { + return nil + } + t := tableprinter.New(h.IO, tableprinter.WithHeader(headers...)) for _, row := range rows {