Conversation
…cio. to fmt. to standardize output
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if options.json { | ||
| json := text.IndentJSON(apiKey) | ||
| pcio.PrintJSON(json) | ||
| fmt.Fprint(os.Stdout, json) |
There was a problem hiding this comment.
JSON output missing trailing newline in two commands
Medium Severity
The old pcio.PrintJSON used fmt.Fprintln which appends a newline. These two call sites replace it with fmt.Fprint(os.Stdout, json) which does not append a newline, while every other replacement in the PR correctly uses fmt.Println(json). Since text.IndentJSON doesn't include a trailing newline, api-key describe --json and api-key update --json will output JSON without a final newline, breaking piping to tools like jq and causing the shell prompt to render on the same line as the output.


Problem
Describe the purpose of this change. What problem is being solved and why?
Solution
remove
pciopackage and--quietflag entirely. update all usages ofpcio.tofmt.to standardize outputType of Change
Test Plan
Describe specific steps for validating this change.
Note
Medium Risk
Removes the
--quietglobal flag and thepciooutput shim, which is a CLI-breaking interface change and may subtly alter stdout/newline behavior for scripts relying on previous output suppression or formatting.Overview
Removes the custom
pcioI/O wrapper and standardizes CLI output onfmt/os.Stdout. All commands/presenters that previously printed viapcionow write directly to stdout/stderr and usefmt.Errorffor errors.Drops global
--quietsupport.rootno longer wires a quiet option, thepciopackage is deleted, spinner output is routed toos.Stdout, and test helpers that silencedpciooutput (plus several per-packageTestMains) are removed/updated accordingly.Written by Cursor Bugbot for commit 80271a8. This will update automatically on new commits. Configure here.