aboutsummaryrefslogtreecommitdiff
path: root/bdep/sync.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-24 21:41:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-25 15:16:58 +0300
commit18bb25efa41dab4a3f7619040e2067da3533decd (patch)
tree822bd06dd0a9d5568c14862592d310fec1012b58 /bdep/sync.cxx
parenta4dabaa6db8806f23bb7d7bdbb95cab456ef3a73 (diff)
Add support for --no-progress option
Diffstat (limited to 'bdep/sync.cxx')
-rw-r--r--bdep/sync.cxx24
1 files changed, 13 insertions, 11 deletions
diff --git a/bdep/sync.cxx b/bdep/sync.cxx
index a8514ab..d4f3983 100644
--- a/bdep/sync.cxx
+++ b/bdep/sync.cxx
@@ -33,20 +33,22 @@ namespace bdep
// Use bpkg-rep-list to discover the list of project directories.
//
- process pr;
+ fdpipe pipe (open_pipe ()); // Text mode seems appropriate.
+
+ process pr (start_bpkg (3,
+ co,
+ pipe /* stdout */,
+ 2 /* stderr */,
+ "rep-list",
+ "-d", cfg));
+
+ // Shouldn't throw, unless something is severely damaged.
+ //
+ pipe.out.close ();
+
bool io (false);
try
{
- fdpipe pipe (fdopen_pipe ()); // Text mode seems appropriate.
-
- pr = start_bpkg (3,
- co,
- pipe /* stdout */,
- 2 /* stderr */,
- "rep-list",
- "-d", cfg);
-
- pipe.out.close ();
ifdstream is (move (pipe.in), fdstream_mode::skip, ifdstream::badbit);
for (string l; !eof (getline (is, l)); )