diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-04-29 22:20:21 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-01 18:10:37 +0300 |
commit | 4476d9d02ac7af21a7bc6ef92490491d308237f4 (patch) | |
tree | 78fe722595c6303c244a9dc421ce6c15d2165fb6 /bpkg/diagnostics.cxx | |
parent | ef30db48d9a910fa06a94a07d231f32a8fce0e46 (diff) |
Add --pkg-proxy common option
Diffstat (limited to 'bpkg/diagnostics.cxx')
-rw-r--r-- | bpkg/diagnostics.cxx | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/bpkg/diagnostics.cxx b/bpkg/diagnostics.cxx index 5b77e65..a471d07 100644 --- a/bpkg/diagnostics.cxx +++ b/bpkg/diagnostics.cxx @@ -7,8 +7,8 @@ #include <odb/statement.hxx> -#include <libbutl/process.mxx> -#include <libbutl/process-io.mxx> // operator<<(ostream, process_arg) +#include <libbutl/process.mxx> // process_args +#include <libbutl/process-io.mxx> // operator<<(ostream, process_*) #include <bpkg/utility.hxx> @@ -22,14 +22,31 @@ namespace bpkg void print_process (const char* const args[], size_t n) { - diag_record r (text); - print_process (r, args, n); + diag_record dr (text); + print_process (dr, args, n); } void - print_process (diag_record& r, const char* const args[], size_t n) + print_process (diag_record& dr, const char* const args[], size_t n) { - r << process_args {args, n}; + dr << process_args {args, n}; + } + + void + print_process (const process_env& pe, const char* const args[], size_t n) + { + diag_record dr (text); + print_process (dr, pe, args, n); + } + + void + print_process (diag_record& dr, + const process_env& pe, const char* const args[], size_t n) + { + if (pe.env ()) + dr << pe << ' '; + + dr << process_args {args, n}; } // Diagnostics verbosity level. |