aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-09-10 17:05:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-09-17 14:35:03 +0300
commitcec96e9c34e608c5f88b73adce5a32fce76d09e6 (patch)
tree1910874381338ffb6f19f392b7caaaa2f03a9d49 /bpkg/pkg-build.cxx
parentd4a64f8409d872c9ed8e969979d466b320eca927 (diff)
Allow options and vars in any order inside argument groups in pkg-build
Diffstat (limited to 'bpkg/pkg-build.cxx')
-rw-r--r--bpkg/pkg-build.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index 19f351f..30713ec 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -3601,15 +3601,17 @@ namespace bpkg
try
{
cli::scanner& ag (args.group ());
- po.parse (ag, cli::unknown_mode::fail, cli::unknown_mode::stop);
while (ag.more ())
{
- string a (ag.next ());
- if (a.find ('=') == string::npos)
- fail << "unexpected group argument '" << a << "'";
+ if (!po.parse (ag) || ag.more ())
+ {
+ string a (ag.next ());
+ if (a.find ('=') == string::npos)
+ fail << "unexpected group argument '" << a << "'";
- cvs.push_back (move (a));
+ cvs.push_back (move (a));
+ }
}
// We have to manually merge global options into local since just