Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove --json flag on commands that do not support it #583

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

ecooper
Copy link
Contributor

@ecooper ecooper commented Jan 23, 2025

Problem

--json is a global formatting option, but not all commands support it or even have an output.

Solution

Move --json out of the global option space and into each individual command that supports it.

Result

--json will only show up in the commands that actually support it. Passing --json to a command that doesn't support it will not cause an error.

Testing

All commands supporting JSON have a test proving it.

@ecooper ecooper requested a review from a team as a code owner January 23, 2025 23:00
@ecooper ecooper linked an issue Jan 23, 2025 that may be closed by this pull request
@cleve-fauna cleve-fauna force-pushed the 580-json-has-no-effect-for-several-commands branch from 4cf66ae to 5fd3c7b Compare January 29, 2025 16:09
@cleve-fauna cleve-fauna merged commit 56522d7 into main Jan 29, 2025
4 checks passed
@cleve-fauna cleve-fauna deleted the 580-json-has-no-effect-for-several-commands branch January 29, 2025 16:50
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.

--json has no effect for several commands
3 participants