1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-01 00:25:06 +02:00

Error on multiple option alternate names and simplify help command.

There are currently no options with multiple alternate (deprecated) names so the code to render them in the help command could not be covered.

Remove the uncovered code and add an error when multiple alternate names are configured.  It's not clear that the current code was handling this correctly, so it will need to be reviewed if it comes up again.
This commit is contained in:
David Steele
2019-05-13 17:10:41 -04:00
parent 2d2bec842a
commit 15a33bf74b
3 changed files with 12 additions and 19 deletions

View File

@ -337,6 +337,12 @@ sub process
if (@stryNameAlt > 0)
{
if (@stryNameAlt != 1)
{
confess &log(
ERROR, "multiple alt names are not supported for option '${strOption}': " . join(', ', @stryNameAlt));
}
$oCommandOption->{&CONFIG_HELP_NAME_ALT} = \@stryNameAlt;
}
}