diff options
-rw-r--r-- | bpkg/bpkg.cxx | 4 | ||||
-rw-r--r-- | bpkg/pkg-build.cxx | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx index 953a5ad..567feff 100644 --- a/bpkg/bpkg.cxx +++ b/bpkg/bpkg.cxx @@ -223,8 +223,8 @@ init (const common_options& co, // Parse the next chunk of options until we reach an argument (or eos). // - if (o.parse (scan)) - continue; + if (o.parse (scan) && !scan.more ()) + break; // Fall through. } 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 |