Merge pull request #9612 from cli/bdehamer/attest-verify-no-tty

Suppress `attestation verify` output when no TTY present
This commit is contained in:
Meredith Lancaster 2024-09-13 10:01:02 -06:00 committed by GitHub
commit 0f42ee46f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {