aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility.hxx
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.hxx
parent7251109c82b16c30410803ef375fe1012445873d (diff)
Improve pkg-checkout progress diagnostics at verbosity level 1
Diffstat (limited to 'bpkg/utility.hxx')
-rw-r--r--bpkg/utility.hxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/bpkg/utility.hxx b/bpkg/utility.hxx
index 5c370ef..c347bda 100644
--- a/bpkg/utility.hxx
+++ b/bpkg/utility.hxx
@@ -79,6 +79,10 @@ namespace bpkg
void
clean_tmp (bool ignore_errors);
+ // Progress.
+ //
+ extern bool stderr_term; // True if stderr is a terminal.
+
// Y/N prompt. The def argument, if specified, should be either 'y'
// or 'n'. It is used as the default answer, in case the user just
// hits enter. Issue diagnostics and throw failed if no answer could
@@ -157,11 +161,20 @@ namespace bpkg
const char*
name_b (const common_options&);
+ // Verbosity level 1 mapping.
+ //
+ enum class verb_b
+ {
+ quiet, // Run quiet.
+ progress, // Run quiet but (potentially) with progress.
+ normal // Run normally (at verbosity 1).
+ };
+
void
run_b (const common_options&,
const dir_path& configuration,
const string& buildspec,
- bool quiet = false,
+ verb_b = verb_b::normal,
const strings& pvars = strings (),
const strings& cvars = strings ());
}