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

Add JSON status output for all commands and errors #60

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

SmithChart
Copy link
Member

This PR adds JSON output to all CLI commands, if the --json switch is set.
If the command does not output anything: Return an empty message.

It also makes sure that error messages are output in JSON, if it is an Exception, that the CLI has already handled before. Thus the key error-message will be present if the return code is != 0.

This commit adds JSON output to all CLI commands, if the --json switch
is set.
If the command does not output anything: Return an empty message.

It also makes sure that error messages are output in JSON, if it is an
Exception, that the CLI has already handled before.
Thus the key ``error-message`` will be present if the return code is
``!= 0``.

Signed-off-by: Chris Fiege <[email protected]>
@jluebbe jluebbe merged commit 7c09767 into master Dec 18, 2023
5 checks passed
@jluebbe jluebbe deleted the cfi/json-all-commands branch December 18, 2023 12:16
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.

2 participants