diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2025-02-10 09:59:22 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2025-02-10 12:05:44 +0200 |
commit | 84c13fe970101b6f0b1c0510f80c445f2ab9540a (patch) | |
tree | e031b922edf290a5ad8ff1ed056c59ea890e138f /libbuild2/build/script | |
parent | 4a6fefcc7c8e1521656f3944b9292a2f6e0ab304 (diff) |
Don't pass true for last_cmd argument of build2::script::run() function if don't specify the function to replace command with
Also rename last_cmd argument of script::run[_cond]() functions, to properly
reflect its semantics, and change its default value.
Diffstat (limited to 'libbuild2/build/script')
-rw-r--r-- | libbuild2/build/script/parser.cxx | 2 | ||||
-rw-r--r-- | libbuild2/build/script/runner.cxx | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx index c362776..95b835e 100644 --- a/libbuild2/build/script/parser.cxx +++ b/libbuild2/build/script/parser.cxx @@ -2826,7 +2826,7 @@ namespace build2 cmd, nullptr /* iteration_index */, li, ll, - cf, false /* last_cmd */); + cf); iss.exceptions (istream::badbit); } diff --git a/libbuild2/build/script/runner.cxx b/libbuild2/build/script/runner.cxx index 5d9764b..fc0fc05 100644 --- a/libbuild2/build/script/runner.cxx +++ b/libbuild2/build/script/runner.cxx @@ -143,7 +143,13 @@ namespace build2 (cf != nullptr && p.recall.string () == "for")); }) != expr.end ()) - build2::script::run (env, expr, ii, li, ll, cf); + { + build2::script::run (env, + expr, + ii, li, + ll, + cf, (cf != nullptr) /* replace_last_cmd */); + } else if (verb >= 2) text << expr; } |