aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-11-10 17:54:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-11-14 14:12:22 +0300
commit9254560cc32fe219da9d9fe454e396e8f2a13b33 (patch)
treedb911671b0e3df3cf670a5458ad156c62e39b0d8 /libbuild2/utility.cxx
parent91119c23370c54cd74d6350bcba7975805c3e9bf (diff)
Make $process.run() print builtin command line on error and verbosity level >= 3
Diffstat (limited to 'libbuild2/utility.cxx')
-rw-r--r--libbuild2/utility.cxx15
1 files changed, 15 insertions, 0 deletions
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 ()
{