From 2dfbf7564fc94841537ba8fb3d46063ab438dda6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 20 Sep 2021 21:43:35 +0300 Subject: Fix options/arguments parsing in bpkg.cxx --- bpkg/bpkg.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx index 567feff..1abe037 100644 --- a/bpkg/bpkg.cxx +++ b/bpkg/bpkg.cxx @@ -210,6 +210,11 @@ init (const common_options& co, { if (opt) { + // Parse the next chunk of options until we reach an argument (or eos). + // + if (o.parse (scan) && !scan.more ()) + break; + // If we see first "--", then we are done parsing options. // if (strcmp (scan.peek (), "--") == 0) @@ -221,11 +226,6 @@ init (const common_options& co, continue; } - // Parse the next chunk of options until we reach an argument (or eos). - // - if (o.parse (scan) && !scan.more ()) - break; - // Fall through. } -- cgit v1.1