aboutsummaryrefslogtreecommitdiff
path: root/build2/install
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-09-17 00:39:40 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-09-17 23:49:15 +0300
commit145adc9d4bc338657ce6f609dcac67682eb329e3 (patch)
tree3e87bcb76f693a0aa2284a4916a54519be6ae1a4 /build2/install
parentaaf0d51b8ba50f2614313bf098ee6695235db676 (diff)
Audit all print_process()/process ctor for path_search()
Diffstat (limited to 'build2/install')
-rw-r--r--build2/install/rule.cxx66
1 files changed, 38 insertions, 28 deletions
diff --git a/build2/install/rule.cxx b/build2/install/rule.cxx
index 038b53c..fd88699 100644
--- a/build2/install/rule.cxx
+++ b/build2/install/rule.cxx
@@ -437,14 +437,16 @@ namespace build2
args.push_back (reld.string ().c_str ());
args.push_back (nullptr);
- if (verb >= 2)
- print_process (args);
- else if (verb && verbose)
- text << "install " << d;
-
try
{
- process pr (args.data ());
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 2)
+ print_process (args);
+ else if (verb && verbose)
+ text << "install " << d;
+
+ process pr (pp, args.data ());
if (!pr.wait ())
throw failed ();
@@ -498,14 +500,16 @@ namespace build2
args.push_back (reld.string ().c_str ());
args.push_back (nullptr);
- if (verb >= 2)
- print_process (args);
- else if (verb && verbose)
- text << "install " << t;
-
try
{
- process pr (args.data ());
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 2)
+ print_process (args);
+ else if (verb && verbose)
+ text << "install " << t;
+
+ process pr (pp, args.data ());
if (!pr.wait ())
throw failed ();
@@ -545,14 +549,16 @@ namespace build2
const char** args (&args_a[base.sudo == nullptr ? 1 : 0]);
- if (verb >= 2)
- print_process (args);
- else if (verb && verbose)
- text << "install " << rell << " -> " << target;
-
try
{
- process pr (args);
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 2)
+ print_process (args);
+ else if (verb && verbose)
+ text << "install " << rell << " -> " << target;
+
+ process pr (pp, args);
if (!pr.wait ())
throw failed ();
@@ -699,14 +705,16 @@ namespace build2
const char** args (&args_a[base.sudo == nullptr ? 1 : 0]);
- if (verb >= 2)
- print_process (args);
- else if (verb && verbose)
- text << "uninstall " << reld;
-
try
{
- process pr (args);
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 2)
+ print_process (args);
+ else if (verb && verbose)
+ text << "uninstall " << reld;
+
+ process pr (pp, args);
if (!pr.wait ())
throw failed ();
@@ -798,12 +806,14 @@ namespace build2
const char** args (&args_a[base.sudo == nullptr ? 1 : 0]);
- if (verb >= 2)
- print_process (args);
-
try
{
- process pr (args);
+ process_path pp (process::path_search (args[0]));
+
+ if (verb >= 2)
+ print_process (args);
+
+ process pr (pp, args);
if (!pr.wait ())
throw failed ();