We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b46102 commit 45d22d0Copy full SHA for 45d22d0
reference/extensions/custom_commands.rst
@@ -63,11 +63,12 @@ Main decorator to declare a function as a new Conan command. Where the parameter
63
import json
64
65
from conan.api.conan_api import ConanAPI
66
- from conan.api.output import ConanOutput
+ from conan.api.output import ConanOutput, cli_out_write
67
from conan.cli.command import conan_command
68
69
def output_json(msg):
70
- return json.dumps({"greet": msg})
+ myjson = json.dumps({"greet": msg})
71
+ cli_out_write(myjson)
72
73
74
@conan_command(group="Custom commands", formatters={"json": output_json})
0 commit comments