aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-14 14:34:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-14 14:34:12 +0200
commit7acf8ce6111e3740decd39b92c3383fcbdd00e21 (patch)
tree2c9c6d75bbac9b3b8a4dc9e7b46df01ba0ca3bf2 /bdep/utility.txx
parentc8f2a2c0776aee57af6af10d4a0128befbc1fdeb (diff)
Implement fetch command
Diffstat (limited to 'bdep/utility.txx')
-rw-r--r--bdep/utility.txx21
1 files changed, 12 insertions, 9 deletions
diff --git a/bdep/utility.txx b/bdep/utility.txx
index 9e94196..8a4236b 100644
--- a/bdep/utility.txx
+++ b/bdep/utility.txx
@@ -76,17 +76,20 @@ namespace bdep
// 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.
//
- bool quiet (true); // Maybe will become an argument one day.
+ 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)
+ switch (verb)
{
- vl = to_string (verb);
- ops.push_back ("--verbose");
- ops.push_back (vl.c_str ());
+ case 0: ops.push_back ( "-q"); break;
+ case 1: ops.push_back (quiet ? "-q" : "--no-result"); break;
+ case 2: ops.push_back ( "-v"); break;
+ default:
+ {
+ vl = to_string (verb);
+ ops.push_back ("--verbose");
+ ops.push_back (vl.c_str ());
+ }
}
// Forward our --build* options.