summaryrefslogtreecommitdiff
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 b32c9ea66c..8e64316fe0 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -259,6 +259,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;
args.out[args.cpidx++] = args.argv[0];
continue;
}