From d8acf937750958313b565e17eb33191e90dd4b36 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 10 Mar 2018 09:40:06 +0200 Subject: Map our verbosity level to bpkg --- bdep/utility.txx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'bdep/utility.txx') diff --git a/bdep/utility.txx b/bdep/utility.txx index 9256bc7..52bbfdb 100644 --- a/bdep/utility.txx +++ b/bdep/utility.txx @@ -27,10 +27,26 @@ namespace bdep { process_path pp (process::path_search (bpkg, exec_dir)); - // Forward our --build* options. + small_vector ops; + + // Map verbosity level. If we are running quiet or at level 1, then run + // bpkg quiet. Otherwise, run it at the same level as us. // - cstrings ops; + bool quiet (false); // Maybe will become an argument one day. + string vl; + if (verb <= (quiet ? 1 : 0)) + ops.push_back ("-q"); + else if (verb == 2) + ops.push_back ("-v"); + else if (verb > 2) + { + vl = to_string (verb); + ops.push_back ("--verbose"); + ops.push_back (vl.c_str ()); + } + // Forward our --build* options. + // if (co.build_specified ()) { ops.push_back ("--build"); -- cgit v1.1