mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Error if option prefix and index total are not both defined.
They are both required for indexed options.
This commit is contained in:
parent
d780d084b7
commit
2f7e139534
@ -2612,6 +2612,13 @@ foreach my $strCommand (sort(keys(%{$rhCommandDefine})))
|
||||
####################################################################################################################################
|
||||
foreach my $strKey (sort(keys(%hConfigDefine)))
|
||||
{
|
||||
# Error if prefix and index total are not both defined
|
||||
if ((defined($hConfigDefine{$strKey}{&CFGDEF_PREFIX}) && !defined($hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL})) ||
|
||||
(!defined($hConfigDefine{$strKey}{&CFGDEF_PREFIX}) && defined($hConfigDefine{$strKey}{&CFGDEF_INDEX_TOTAL})))
|
||||
{
|
||||
confess &log(ASSERT, "CFGDEF_PREFIX and CFGDEF_INDEX_TOTAL must both be defined (or neither) for option '${strKey}'");
|
||||
}
|
||||
|
||||
# If the define is a scalar then copy the entire define from the referenced option
|
||||
if (defined($hConfigDefine{$strKey}{&CFGDEF_INHERIT}))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user