Skip to content

Fix --quiet --json combination suppressing command output#72

Merged
austin-denoble merged 2 commits intomainfrom
adenoble/fix-quiet-suppressing-json
Mar 19, 2026
Merged

Fix --quiet --json combination suppressing command output#72
austin-denoble merged 2 commits intomainfrom
adenoble/fix-quiet-suppressing-json

Conversation

@austin-denoble
Copy link
Collaborator

@austin-denoble austin-denoble commented Mar 19, 2026

Problem

Currently, passing --quiet --json to commands ends up suppressing the expected JSON output due to pcio. We're going to most likely remove pcio entirely in a future PR.

Solution

Make sure --quiet --json flag comination doesn't suppress command output, add pcio.PrintJSON that writes directly to stdout and replace pcio.Println across commands.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Run commands with --json --quiet and make sure you're seeing JSON in stdout.


Note

Low Risk
Low risk: output-path change only, routing JSON to stdout regardless of quiet mode; potential risk is minor formatting/stream changes for scripts expecting previous suppression behavior.

Overview
Fixes the --quiet --json combination by adding pcio.PrintJSON (always writes to stdout) and switching JSON output paths across CLI commands from pcio.Println to pcio.PrintJSON.

This ensures machine-readable JSON is emitted even in quiet mode for commands like API key, auth, backup restore, collections, indexes/namespaces/records/vectors, organizations, projects, and target, and adds unit tests covering PrintJSON vs Println behavior under quiet mode.

Written by Cursor Bugbot for commit 07d74a1. This will update automatically on new commits. Configure here.

…put, add pcio.PrintJSON that writes directly to stdout and replace pcio.Println across commands
@austin-denoble austin-denoble merged commit 42e1039 into main Mar 19, 2026
8 checks passed
@austin-denoble austin-denoble deleted the adenoble/fix-quiet-suppressing-json branch March 19, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant