From 7cbea6d908fddc48357a88d6edf30451c7d2b487 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Oct 2021 17:17:09 +0200 Subject: Add --progress common option --- bpkg/utility.txx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bpkg/utility.txx') 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"); -- cgit v1.1