aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.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/utility.cxx
parenta4dabaa6db8806f23bb7d7bdbb95cab456ef3a73 (diff)
Add support for --no-progress option
Diffstat (limited to 'bdep/utility.cxx')
-rw-r--r--bdep/utility.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/bdep/utility.cxx b/bdep/utility.cxx
index b670587..8caedc6 100644
--- a/bdep/utility.cxx
+++ b/bdep/utility.cxx
@@ -80,6 +80,8 @@ namespace bdep
}
}
+ bool stderr_term;
+
bool
exists (const path& f, bool ignore_error)
{
@@ -174,6 +176,32 @@ namespace bdep
}
}
+ fdpipe
+ open_pipe ()
+ {
+ try
+ {
+ return fdopen_pipe ();
+ }
+ catch (const io_error& e)
+ {
+ fail << "unable to open pipe: " << e << endf;
+ }
+ }
+
+ auto_fd
+ open_dev_null ()
+ {
+ try
+ {
+ return fdnull ();
+ }
+ catch (const io_error& e)
+ {
+ fail << "unable to open null device: " << e << endf;
+ }
+ }
+
const char*
name_bpkg (const common_options& co)
{