Closed pa345 closed 4 years ago
This feature is available in current master, via CONFIG_OPTION_ALLOW_OVERRIDES
/Config::OptionAllowOverrides
:
This option controls whether duplicate settings override previous settings with the same name. If this option is turned off, duplicate settings are rejected. By default this option is turned off.
Thank you!
I would like to have a default config file with a bunch of settings, which is included by other config files. But then I want to override some default settings in the individual files. For example:
@include "default.cfg"
/ this variable is already defined in default.cfg but I want to change it / var_already_defined = another_value;
Unfortunately, in this scenario, libconfig will raise an error about duplicate variables. Would it be possible to allow over-riding variables in this manner?