Skip to content

Commit

Permalink
fix(config: migrate): print warning before doing migration
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Dec 19, 2024
1 parent 3577424 commit 4fb5698
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pikaur/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,12 +790,12 @@ def _migrate_deprecated_config_value(
def migrate_config(cls) -> None:
for section_name, section in ConfigSchema().items():
for option_name, option_schema in section.items():
if option_schema.get("warning"):
cls._handle_warning(option_schema, section_name, option_name)
if option_schema.get("old_default"):
cls._migrate_deprecated_config_value(option_schema, section_name, option_name)
elif option_schema.get("deprecated"):
cls._migrate_deprecated_config_key(option_schema, section_name, option_name)
if option_schema.get("warning"):
cls._handle_warning(option_schema, section_name, option_name)

@classmethod
def validate_config(cls) -> None:
Expand Down

0 comments on commit 4fb5698

Please sign in to comment.