diff --git a/pkg/cmd/attestation/inspect/inspect.go b/pkg/cmd/attestation/inspect/inspect.go index 0b028de7b..abf5eb7fd 100644 --- a/pkg/cmd/attestation/inspect/inspect.go +++ b/pkg/cmd/attestation/inspect/inspect.go @@ -143,12 +143,7 @@ func runInspect(opts *Options) error { jsonResults[i] = string(jsonBytes) } - rows := make([][]string, 1) - rows[0] = jsonResults - if err = opts.Logger.PrintTableToStdOut(nil, rows); err != nil { - return fmt.Errorf("failed to print output as JSON: %w", err) - } - + fmt.Fprintf(opts.Logger.IO.Out, "%v", jsonResults) return nil } diff --git a/pkg/cmd/attestation/verify/verify.go b/pkg/cmd/attestation/verify/verify.go index 1b0c81bb8..227f8ea5c 100644 --- a/pkg/cmd/attestation/verify/verify.go +++ b/pkg/cmd/attestation/verify/verify.go @@ -208,11 +208,7 @@ func runVerify(opts *Options) error { jsonResults[i] = string(jsonBytes) } - rows := make([][]string, 1) - rows[0] = jsonResults - if err := opts.Logger.PrintTableToStdOut(nil, rows); err != nil { - return fmt.Errorf("failed to print JSON output") - } + fmt.Fprintf(opts.Logger.IO.Out, "%v", jsonResults) } // All attestations passed verification and policy evaluation