From e59343b3267e82aff33a8f73ab82b51345913c06 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 10 Nov 2018 22:43:09 +0300 Subject: Add support for vars grouping for package commands --- bpkg/pkg-configure.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bpkg/pkg-configure.cxx') diff --git a/bpkg/pkg-configure.cxx b/bpkg/pkg-configure.cxx index 6db60d4..d63b010 100644 --- a/bpkg/pkg-configure.cxx +++ b/bpkg/pkg-configure.cxx @@ -238,12 +238,21 @@ namespace bpkg // string n; strings vars; + bool sep (false); // Seen '--'. while (args.more ()) { string a (args.next ()); - if (a.find ('=') != string::npos) + // If we see the "--" separator, then we are done parsing variables. + // + if (!sep && a == "--") + { + sep = true; + continue; + } + + if (!sep && a.find ('=') != string::npos) vars.push_back (move (a)); else if (n.empty ()) n = move (a); -- cgit v1.1