Skip to content

Commit

Permalink
Merge pull request #14639 from light-and-ray/fix_extension_check_for_…
Browse files Browse the repository at this point in the history
…requirements

[Bug] Fix extension check for requirements
  • Loading branch information
AUTOMATIC1111 committed Jan 20, 2024
2 parents 58a142b + b6dc307 commit a06ae54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a06ae54

Please sign in to comment.