From f50d0d58c8eb659e803282e19cf15398e3a8e373 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 3 Jun 2020 14:38:39 +0300 Subject: Fix $process.run() to properly handle proces_path_ex --- libbuild2/variable.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'libbuild2/variable.cxx') diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx index e0502ef..9009fdc 100644 --- a/libbuild2/variable.cxx +++ b/libbuild2/variable.cxx @@ -1083,7 +1083,7 @@ namespace build2 const string& k ((i++)->value); - // NOTE: see also build::script::parser::parse_program(). + // NOTE: see also find_end() below. // if (k == "name") { @@ -1107,6 +1107,19 @@ namespace build2 return pp; } + names::iterator value_traits:: + find_end (names& ns) + { + auto b (ns.begin ()), i (b), e (ns.end ()); + for (i += i->pair ? 2 : 1; i != e && i->pair; i += 2) + { + if (!i->simple () || (i->value != "name" && i->value != "checksum")) + break; + } + + return i; + } + static void process_path_ex_assign (value& v, names&& ns, const variable* var) { -- cgit v1.1