[LIB]: Handle --help, -?, --usage in with_executable_option()
Ugh, what a hack, have to fix this properly somehow. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
53feaeda28
commit
161c6712f4
|
@ -2723,7 +2723,11 @@ out:
|
|||
static int with_executable_option(int argc, char *argv[])
|
||||
{
|
||||
while (--argc != 0)
|
||||
if (strcmp(argv[argc], "--executable") == 0 ||
|
||||
if (strcmp(argv[argc], "--help") == 0 ||
|
||||
strcmp(argv[argc], "-?") == 0 ||
|
||||
strcmp(argv[argc], "-h") == 0 ||
|
||||
strcmp(argv[argc], "--usage") == 0 ||
|
||||
strcmp(argv[argc], "--executable") == 0 ||
|
||||
(argv[argc][0] == '-' && argv[argc][1] != '-' &&
|
||||
strchr(argv[argc] + 1, 'e') != NULL))
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue