fix_extension_check_for_requirements

This commit is contained in:
Andray 2024-01-13 14:45:15 +04:00
parent cb5b335acd
commit b6dc307c99

View File

@ -224,13 +224,16 @@ def list_extensions():
# check for requirements
for extension in extensions:
if not extension.enabled:
continue
for req in extension.metadata.requires:
required_extension = loaded_extensions.get(req)
if required_extension is None:
errors.report(f'Extension "{extension.name}" requires "{req}" which is not installed.', exc_info=False)
continue
if not extension.enabled:
if not required_extension.enabled:
errors.report(f'Extension "{extension.name}" requires "{required_extension.name}" which is disabled.', exc_info=False)
continue