aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-29 14:02:18 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2018-04-19 19:39:55 +0300
commit4c7b3f9500c668aa99328e419f6d09c722814f97 (patch)
treed651e03898965e956dabbff72b184508d458b271 /bpkg/utility.cxx
parent7251109c82b16c30410803ef375fe1012445873d (diff)
Improve pkg-checkout progress diagnostics at verbosity level 1
Diffstat (limited to 'bpkg/utility.cxx')
-rw-r--r--bpkg/utility.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx
index 652cd46..f48d96d 100644
--- a/bpkg/utility.cxx
+++ b/bpkg/utility.cxx
@@ -82,6 +82,8 @@ namespace bpkg
}
}
+ bool stderr_term;
+
bool
yn_prompt (const char* prompt, char def)
{
@@ -323,7 +325,7 @@ namespace bpkg
run_b (const common_options& co,
const dir_path& c,
const string& bspec,
- bool quiet,
+ verb_b v,
const strings& pvars,
const strings& cvars)
{
@@ -334,11 +336,22 @@ namespace bpkg
// as us.
//
string vl;
- if (verb <= (quiet ? 1 : 0))
+
+ if (verb == 0)
args.push_back ("-q");
+ else if (verb == 1)
+ {
+ if (v != verb_b::normal)
+ {
+ args.push_back ("-q");
+
+ if (v == verb_b::progress && stderr_term)
+ args.push_back ("--progress");
+ }
+ }
else if (verb == 2)
args.push_back ("-v");
- else if (verb > 2)
+ else
{
vl = to_string (verb);
args.push_back ("--verbose");