aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.hxx
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.hxx
parent91119c23370c54cd74d6350bcba7975805c3e9bf (diff)
Make $process.run() print builtin command line on error and verbosity level >= 3
Diffstat (limited to 'libbuild2/utility.hxx')
-rw-r--r--libbuild2/utility.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx
index 0271642..5fffc8c 100644
--- a/libbuild2/utility.hxx
+++ b/libbuild2/utility.hxx
@@ -872,6 +872,18 @@ namespace build2
bool trim = true,
sha256* checksum = nullptr);
+ // Concatenate the program path and arguments into a shallow NULL-terminated
+ // vector of C-strings.
+ //
+ LIBBUILD2_SYMEXPORT cstrings
+ process_args (const char* program, const strings& args);
+
+ inline cstrings
+ process_args (const string& program, const strings& args)
+ {
+ return process_args (program.c_str (), args);
+ }
+
// File descriptor streams.
//
fdpipe