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.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libbuild2/utility.hxx') 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 -- cgit v1.1