aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility.txx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-19 21:50:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-24 13:09:49 +0300
commitf40f28b12046cc993712956497dfb9d9baa452f9 (patch)
tree2637f186e99bee3572e55438190a4e4e96b8bdf3 /bpkg/utility.txx
parent707408c353bbc4b563f2b9d7c89ce34bf4ab7d47 (diff)
Add support for --no-progress option
Diffstat (limited to 'bpkg/utility.txx')
-rw-r--r--bpkg/utility.txx16
1 files changed, 14 insertions, 2 deletions
diff --git a/bpkg/utility.txx b/bpkg/utility.txx
index 93699ab..71701bc 100644
--- a/bpkg/utility.txx
+++ b/bpkg/utility.txx
@@ -36,17 +36,26 @@ namespace bpkg
// as us.
//
string vl;
+ bool no_progress (co.no_progress ());
if (verb == 0)
+ {
ops.push_back ("-q");
+ no_progress = false; // Already suppressed with -q.
+ }
else if (verb == 1)
{
if (v != verb_b::normal)
{
ops.push_back ("-q");
- if (v == verb_b::progress && stderr_term)
- ops.push_back ("--progress");
+ if (!no_progress)
+ {
+ if (v == verb_b::progress && stderr_term)
+ ops.push_back ("--progress");
+ }
+ else
+ no_progress = false; // Already suppressed with -q.
}
}
else if (verb == 2)
@@ -58,6 +67,9 @@ namespace bpkg
ops.push_back (vl.c_str ());
}
+ if (no_progress)
+ ops.push_back ("--no-progress");
+
return process_start_callback (
[] (const char* const args[], size_t n)
{