aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/b.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 8e9b154..f0f5a7a 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -280,6 +280,12 @@ main (int argc, char* argv[])
{
if (opt)
{
+ // Parse the next chunk of options until we reach an argument (or
+ // eos).
+ //
+ if (ops.parse (scan) && !scan.more ())
+ break;
+
// If we see first "--", then we are done parsing options.
//
if (strcmp (scan.peek (), "--") == 0)
@@ -289,12 +295,6 @@ main (int argc, char* argv[])
continue;
}
- // Parse the next chunk of options until we reach an argument (or
- // eos).
- //
- if (ops.parse (scan))
- continue;
-
// Fall through.
}