yera.config.replacement
Safely replace unusable global Yera configuration.
Symbols
ConfigReplacement
Result of replacing unusable global Yera configuration.
Attributes
Global configuration path replaced by the operation.
Path containing the original configuration.
replace_invalid_yera_toml
replace_invalid_yera_toml() → ConfigReplacementBack up and replace unusable global Yera configuration.
Re-inspects the global configuration immediately before replacement to avoid acting on stale setup state. Only malformed TOML or schema-invalid Yera configuration can be replaced.
The original file is copied into a backups directory beside
yera.toml. The active configuration is then atomically replaced by an
empty file, which is valid initial Yera configuration.
Returns
Paths to the replaced global configuration and its preserved backup.
Raises
If the configuration is missing or valid.
If the backup or atomic replacement cannot be completed.