From f40f28b12046cc993712956497dfb9d9baa452f9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 19 Jan 2019 21:50:43 +0300 Subject: Add support for --no-progress option --- bpkg/common.cli | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'bpkg/common.cli') diff --git a/bpkg/common.cli b/bpkg/common.cli index 31580c0..4090ad3 100644 --- a/bpkg/common.cli +++ b/bpkg/common.cli @@ -100,6 +100,23 @@ namespace bpkg a command." } + // 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 (which we may add in the + // future), we request full progress. Finally, without any --*progress + // options we let the external program decide what to do: it may do + // something intelligent (like curl) and produce non-terminal-friendly + // progress (such as status lines printed periodically) or it may disable + // progress all together (like git). Of course, it may also do no + // detection and dump non-terminal-unfriendly progress in which case we + // should probably do the detection ourselves and suppress it. + // + bool --no-progress + { + "Suppress progress indicators for long-lasting operations, such as + network transfers, building, etc." + } + path --build { "", @@ -138,6 +155,14 @@ namespace bpkg \cb{wget}, and \cb{fetch}." } + strings --fetch-option + { + "", + "Additional option to be passed to the fetch program. See \cb{--fetch} + for more information on the fetch program. Repeat this option to + specify multiple fetch options." + } + size_t --fetch-timeout { "", @@ -157,14 +182,6 @@ namespace bpkg programs." } - strings --fetch-option - { - "", - "Additional option to be passed to the fetch program. See \cb{--fetch} - for more information on the fetch program. Repeat this option to - specify multiple fetch options." - } - path --git = "git" { "", -- cgit v1.1