diff options
Diffstat (limited to 'cli/cli.h')
-rw-r--r-- | cli/cli.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -431,8 +431,11 @@ static int parse_options(struct cli_ctx *ctx) return CLI_RC_OK; if (key[1] == '-') { /* Everything after '--' are non-option arguments */ - if (key[2] == '\0') + if (key[2] == '\0') { + ctx->argc--; + ctx->argv++; return CLI_RC_OK; + } int rc = parse_long(ctx); if (rc != CLI_RC_OK) @@ -520,7 +523,7 @@ static int cli_run(struct cli *const cli, int argc, char *argv[]) ctx.argv++; rc = cli_cmd_run(cli, cmd, &ctx); - goto out; + return rc; } } rc = CLI_RC_BAD_ARGS; |