Throw an error if non-option arguments are supplied
This commit is contained in:
parent
9435078a8e
commit
a605a2ae4d
1 changed files with 5 additions and 0 deletions
|
@ -838,6 +838,11 @@ static void parse_cmdline(int argc, char *argv[])
|
||||||
|
|
||||||
parse_arg(key, optarg);
|
parse_arg(key, optarg);
|
||||||
}
|
}
|
||||||
|
if (optind < argc) {
|
||||||
|
fprintf(stderr, "%s: unsupported non-option argument '%s'\n",
|
||||||
|
argv[0], argv[optind]);
|
||||||
|
show_usage_and_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
parse_config();
|
parse_config();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue