aboutsummaryrefslogtreecommitdiff
path: root/build2/utility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r--build2/utility.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/build2/utility.cxx b/build2/utility.cxx
index 2d8e59b..4da2195 100644
--- a/build2/utility.cxx
+++ b/build2/utility.cxx
@@ -174,7 +174,7 @@ namespace build2
process
run_start (uint16_t verbosity,
- const process_path& pp,
+ const process_env& pe,
const char* args[],
int in,
int out,
@@ -183,12 +183,21 @@ namespace build2
const location& l)
try
{
- assert (args[0] == pp.recall_string ());
+ assert (args[0] == pe.path->recall_string ());
if (verb >= verbosity)
print_process (args, 0);
- return process (pp, args, in, out, (err ? 2 : 1), cwd.string ().c_str ());
+ return process (
+ *pe.path,
+ args,
+ in,
+ out,
+ (err ? 2 : 1),
+ (!cwd.empty ()
+ ? cwd.string ().c_str ()
+ : pe.cwd != nullptr ? pe.cwd->string ().c_str () : nullptr),
+ pe.vars);
}
catch (const process_error& e)
{