diff --git a/parse-options.c b/parse-options.c
index cd926869166fe28d4c116840be6921de7aa3cbda..42b51ef14514f3c3df454e4b718718a9b58f1612 100644 (file)
--- a/parse-options.c
+++ b/parse-options.c
if (parse_nodash_opt(ctx, arg, options) == 0)
continue;
if (ctx->flags & PARSE_OPT_STOP_AT_NON_OPTION)
- break;
+ return PARSE_OPT_NON_OPTION;
ctx->out[ctx->cpidx++] = ctx->argv[0];
continue;
}
switch (parse_options_step(&ctx, options, usagestr)) {
case PARSE_OPT_HELP:
exit(129);
+ case PARSE_OPT_NON_OPTION:
case PARSE_OPT_DONE:
break;
default: /* PARSE_OPT_UNKNOWN */