You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-09-16 09:06:18 +02:00
Add default type for current pgbackrest binary.
These defaults were being set in cfgLoadUpdate() but they can be better documented if they are part of the option rules. This is part of a general trend to move away from custom-coded defaults.
This commit is contained in:
@@ -106,6 +106,7 @@ option:
|
||||
# Options that are not used but must be present for modules to compile. All must have a default or not be required.
|
||||
#---------------------------------------------------------------------------------------------------------------------------------
|
||||
beta: {type: boolean, default: false, command: {noop: {}}}
|
||||
cmd: {type: string, default-type: dynamic, default: bin, command: {noop: {}}}
|
||||
compress-level-network: {type: string, required: false, command: {noop: {}}}
|
||||
config: {
|
||||
type: string, internal: true, default-type: literal, default: CFGOPTDEF_CONFIG_PATH "/" PROJECT_CONFIG_FILE, negate: true}
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<operation-general>
|
||||
<option-list>
|
||||
<option id="beta"><summary></summary><text><p></p></text></option>
|
||||
<option id="cmd"><summary></summary><text><p></p></text></option>
|
||||
<option id="config"><summary></summary><text><p></p></text></option>
|
||||
<option id="config-path"><summary></summary><text><p></p></text></option>
|
||||
<option id="config-include-path"><summary></summary><text><p></p></text></option>
|
||||
|
@@ -49,7 +49,13 @@ referenceOptionRender(
|
||||
const String *const defaultValue =
|
||||
optCmdCfg != NULL && optCmdCfg->defaultValue != NULL ? optCmdCfg->defaultValue : optCfg->defaultValue;
|
||||
|
||||
if (defaultValue != NULL)
|
||||
if (optCfg->defaultType == defaultTypeDynamic)
|
||||
{
|
||||
ASSERT(strEqZ(optCfg->defaultValue, "bin"));
|
||||
|
||||
strLstAddZ(blockList, "default: [path of executed pgbackrest binary]");
|
||||
}
|
||||
else if (defaultValue != NULL)
|
||||
{
|
||||
if (strEq(optCfg->type, OPT_TYPE_BOOLEAN_STR))
|
||||
strLstAddFmt(blockList, "default: %s", strEqZ(defaultValue, "true") ? "y" : "n");
|
||||
|
Reference in New Issue
Block a user