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/build/script/parser.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'libbuild2/build/script') diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx index 2a0555e..c4c4b03 100644 --- a/libbuild2/build/script/parser.cxx +++ b/libbuild2/build/script/parser.cxx @@ -475,18 +475,12 @@ namespace build2 { // Find the end of the value. // - 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; - } + auto b (ns.begin ()); + auto i (value_traits::find_end (ns)); if (b->pair || i != b + 1) // First is a pair or pairs after. { - pp_ns.insert (pp_ns.end (), - make_move_iterator (b), make_move_iterator (i)); + pp_ns = names (make_move_iterator (b), make_move_iterator (i)); ns.erase (b, i); -- cgit v1.1