aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-21 17:17:09 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2021-10-25 11:48:00 +0300
commit7cbea6d908fddc48357a88d6edf30451c7d2b487 (patch)
treec300cb13a84bb29c98873f737cda98b832d7757f /bpkg/utility.txx
parentb3e3a692da419cbf7a87f6b2953bf03d1647d7ac (diff)
Add --progress common option
Diffstat (limited to 'bpkg/utility.txx')
-rw-r--r--bpkg/utility.txx7
1 files changed, 7 insertions, 0 deletions
diff --git a/bpkg/utility.txx b/bpkg/utility.txx
index b2c2a3c..47619c6 100644
--- a/bpkg/utility.txx
+++ b/bpkg/utility.txx
@@ -33,6 +33,7 @@ namespace bpkg
// as us.
//
string vl;
+ bool progress (co.progress ());
bool no_progress (co.no_progress ());
if (verb == 0)
@@ -49,7 +50,10 @@ namespace bpkg
if (!no_progress)
{
if (v == verb_b::progress && stderr_term)
+ {
ops.push_back ("--progress");
+ progress = false; // The option is already added.
+ }
}
else
no_progress = false; // Already suppressed with -q.
@@ -64,6 +68,9 @@ namespace bpkg
ops.push_back (vl.c_str ());
}
+ if (progress)
+ ops.push_back ("--progress");
+
if (no_progress)
ops.push_back ("--no-progress");