From 9254560cc32fe219da9d9fe454e396e8f2a13b33 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 10 Nov 2022 17:54:57 +0300 Subject: Make $process.run() print builtin command line on error and verbosity level >= 3 --- libbuild2/utility.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libbuild2/utility.cxx') diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx index 5659771..3ce0026 100644 --- a/libbuild2/utility.cxx +++ b/libbuild2/utility.cxx @@ -607,6 +607,21 @@ namespace build2 run_finish_impl (dbuf, args, pr, true /* fail */, finish_verbosity); } + cstrings + process_args (const char* program, const strings& args) + { + cstrings r; + r.reserve (args.size () + 2); + + r.push_back (program); + + for (const string& a: args) + r.push_back (a.c_str ()); + + r.push_back (nullptr); + return r; + } + fdpipe open_pipe () { -- cgit v1.1