aboutsummaryrefslogtreecommitdiff
path: root/bpkg/common.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-03-28 10:12:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-03-28 10:12:17 +0200
commit699d0dfe6769ca949808bf78606a689aeff117df (patch)
tree3a42e946252996f496bb36e43a5a2e13918a5929 /bpkg/common.cli
parentd38f564abaf6fcbc6c7cf2922f3e8f4c8327362f (diff)
Add support for JSON structured result output in pkg-bindist
Diffstat (limited to 'bpkg/common.cli')
-rw-r--r--bpkg/common.cli15
1 files changed, 12 insertions, 3 deletions
diff --git a/bpkg/common.cli b/bpkg/common.cli
index 0d97631..c7d28bc 100644
--- a/bpkg/common.cli
+++ b/bpkg/common.cli
@@ -98,9 +98,6 @@ namespace bpkg
\cb{test}, etc."
}
- // In the future we may also have --structured-result, similar to the
- // build system.
- //
bool --no-result
{
"Don't print informational messages about the outcome of performing
@@ -109,6 +106,18 @@ namespace bpkg
instead, unless suppressed with \cb{--no-progress}."
}
+ string --structured-result
+ {
+ "<fmt>",
+ "Write the result of performing a command in a structured form. In
+ this mode, instead of printing to \cb{stderr} informational messages
+ about the outcome of performing a command or some of its parts,
+ \cb{bpkg} writes to \cb{stdout} a machine-readable result description
+ in the specified format. Not all commands support producing structured
+ result and valid <fmt> values are command-specific. Consult the command
+ documentation for details."
+ }
+
// When it comes to external programs (such as curl, git, etc), if stderr
// is not a terminal, the logic is actually tri-state: With --no-progress
// we suppress any progress. With --progress we request full progress.