aboutsummaryrefslogtreecommitdiff
path: root/parse-options.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-options.c b/parse-options.c
index d9562ba50..be35785ce 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -249,6 +249,8 @@ int parse_options(int argc, const char **argv, const struct option *options,
const char *arg = args.argv[0];
if (*arg != '-' || !arg[1]) {
+ if (flags & PARSE_OPT_STOP_AT_NON_OPTION)
+ break;
argv[j++] = args.argv[0];
continue;
}