Repository navigation
fix(cli): -q suppresses the --output "Wrote N bytes" status line - #2702
Merged
Merged
Conversation
…2614) In text mode, `--output` confirms the write with a status line on stderr. `-q` is documented to suppress status lines, but this branch never checked `args.quiet`. Gate it, and cover both paths in emit-result.test.ts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the issue requirements and includes focused regression coverage.
0 open findings
What changed in this PR
Ensures CLI quiet mode suppresses the text-mode output-file status line without affecting file writes or JSON envelopes.
Changes:
- Guards the stderr confirmation with
!args.quiet. - Adds coverage for quiet and normal output behavior.
- Documents the quiet-mode behavior.
| File | Description |
|---|---|
clients/cli/src/handlers/emit-result.ts |
Suppresses the status line under -q. |
clients/cli/__tests__/emit-result.test.ts |
Tests status suppression and file persistence. |
clients/cli/README.md |
Documents -q behavior with --output. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
Author
|
Copilot review loop closed: round 1 was clean (0 inline comments, nothing in the headline, no suppressed comments). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2614
Problem
mcp-inspector --cli -q … --output <file>still printedWrote N bytes (json) to <path>on stderr.-qis documented to suppress status lines, but the text-mode--outputbranch ofemitResultnever checkedargs.quiet.Change
clients/cli/src/handlers/emit-result.ts: the confirmation line is only written whenargs.quietis not set. The file is still written.--format jsonis unchanged: it reports the write through the stdout{"output": …}envelope.clients/cli/__tests__/emit-result.test.ts: two tests. Without-qthe line is printed. With-qstderr is empty and the file is still written.clients/cli/README.md: notes that-qsuppresses the confirmation.Verification
npm run local:gatepasses.🤖 Generated with Claude Code