From 699d0dfe6769ca949808bf78606a689aeff117df Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Mar 2023 10:12:17 +0200 Subject: Add support for JSON structured result output in pkg-bindist --- bpkg/common.cli | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'bpkg/common.cli') 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 + { + "", + "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 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. -- cgit v1.1