aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/runner.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-26 21:35:59 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-06-03 12:26:33 +0300
commit920ed11a433b0e292a18adb8c68829a00e8c70cc (patch)
treee365baf8be68b168e19f42f20c5dde1526c1cbba /libbuild2/build/script/runner.cxx
parent4001ff053071c09008e88312c4f973c417322a07 (diff)
Allow process path values and targets as buildscript program names
Also deduce the recipe name.
Diffstat (limited to 'libbuild2/build/script/runner.cxx')
-rw-r--r--libbuild2/build/script/runner.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/libbuild2/build/script/runner.cxx b/libbuild2/build/script/runner.cxx
index 315a248..2a59505 100644
--- a/libbuild2/build/script/runner.cxx
+++ b/libbuild2/build/script/runner.cxx
@@ -61,14 +61,14 @@ namespace build2
try
{
- // Note that the temporary directory must be empty to date.
+ // Note that the temporary directory must be empty.
//
rmdir_status r (try_rmdir (td));
if (r != rmdir_status::success)
{
// While there can be no fault of the script being currently
- // executed let's add the location anyway to ease the
+ // executed let's add the location anyway to help with
// troubleshooting. And let's stick to that principle down the
// road.
//
@@ -110,8 +110,10 @@ namespace build2
find_if (expr.begin (), expr.end (),
[] (const expr_term& et)
{
- const string& p (et.pipe.back ().program.string ());
- return p == "set" || p == "exit";
+ const process_path& p (et.pipe.back ().program);
+ return p.initial == nullptr &&
+ (p.recall.string () == "set" ||
+ p.recall.string () == "exit");
}) != expr.end ())
build2::script::run (env, expr, li, ll);
else if (verb >= 2)