Merge pull request #14639 from light-and-ray/fix_extension_check_for_requirements

[Bug] Fix extension check for requirements
This commit is contained in:
AUTOMATIC1111 2024-01-20 10:30:28 +03:00 committed by GitHub
commit a06ae54a18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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