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/utility.txx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'bpkg/utility.txx') 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) { -- cgit v1.1