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
Fix for WFCORE-3363, CLI to output JSON #2903
Conversation
Full integration - Windows Build 4458 outcome was FAILURE using a merge of 518a148 |
Full integration - Windows Build 4461 outcome was FAILURE using a merge of 518a148 |
cli/src/main/resources/help/help.txt
Outdated
@@ -97,6 +98,9 @@ Usage: | |||
--command-timeout - The maximum amount of seconds the CLI will wait for a | |||
command to complete. | |||
|
|||
--output-json - makes the CLI to display operation responses using JSON syntax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/makes/causes
Minor language thing in the help text aside, looks good! |
Full integration - Windows Build 4485 outcome was FAILURE using a merge of 2b5e7c1 |
@@ -89,7 +89,7 @@ public void handle(CommandContext ctx) throws CommandLineException { | |||
try { | |||
final ModelNode result = ctx.execute(op, "Operation request"); | |||
if (Util.isSuccess(result)) { | |||
ctx.printLine(result.toString()); | |||
ctx.printDMR(result); | |||
} else { | |||
throw new CommandLineException(result.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented on https://developer.jboss.org/wiki/CLI-OutputJSON re: exception handling (i.e. I think this is right.)
Community doc PR: Some CLI new features doc wildfly#10798