From 18bb25efa41dab4a3f7619040e2067da3533decd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 24 Jan 2019 21:41:48 +0300 Subject: Add support for --no-progress option --- bdep/sync.cxx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'bdep/sync.cxx') 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)); ) -- cgit v1.1