1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

texpect: don't ignore unknown options

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2021-09-09 18:14:36 +02:00
parent d179c4f49b
commit c87cc09315

View File

@ -388,7 +388,13 @@ int main(int argc, const char **argv)
} }
while ((optidx = poptGetNextOpt(pc)) != -1) { while ((optidx = poptGetNextOpt(pc)) != -1) {
;; switch (optidx) {
case POPT_ERROR_BADOPT:
fprintf(stderr, "\nInvalid option %s: %s\n\n",
poptBadOption(pc, 0), poptStrerror(optidx));
poptPrintUsage(pc, stderr, 0);
exit(1);
}
} }
instruction_file = poptGetArg(pc); instruction_file = poptGetArg(pc);