mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-01-09 14:45:47 +02:00
Remove duplicate help command code
This commit is contained in:
parent
0afc00439c
commit
d3b1127ab3
@ -271,10 +271,8 @@ main(int argc, char *argv[])
|
|||||||
backup_subcmd = SHOW_CONFIG_CMD;
|
backup_subcmd = SHOW_CONFIG_CMD;
|
||||||
else if (strcmp(argv[optind], "help") == 0)
|
else if (strcmp(argv[optind], "help") == 0)
|
||||||
{
|
{
|
||||||
if (argc - optind < 2)
|
optind++;
|
||||||
help_pg_probackup();
|
help_opt = true;
|
||||||
else
|
|
||||||
help_command(argv[optind + 1]);
|
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[optind], "version") == 0)
|
else if (strcmp(argv[optind], "version") == 0)
|
||||||
version_opt = true;
|
version_opt = true;
|
||||||
@ -284,7 +282,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (help_opt)
|
if (help_opt)
|
||||||
{
|
{
|
||||||
if (backup_subcmd == NO_CMD || argc - optind < 1)
|
if (argc - optind < 1)
|
||||||
help_pg_probackup();
|
help_pg_probackup();
|
||||||
else
|
else
|
||||||
help_command(argv[optind]);
|
help_command(argv[optind]);
|
||||||
|
Loading…
Reference in New Issue
Block a user