conan-io / hooks

Official Conan client hooks
MIT License
32 stars 46 forks source link

Fix build_modules-related typo in conan-center.py #446

Closed petamas closed 2 years ago

petamas commented 2 years ago

This fixes a typo introduced in https://github.com/conan-io/hooks/pull/439

In the original version, the same condition was used for the global and the per-component type check. This PR fixes the per-component condition.

The typo causes an error like this:

[HOOK - conan-center.py] post_package_info(): ERROR: [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] Exception raised from hook: list indices must be integers or slices, not str (type=TypeError) (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H019) 
ERROR: 
    ConanException: [HOOK - conan-center.py] post_package_info(): list indices must be integers or slices, not str

This error is currently blocking me from merging this PR: https://github.com/conan-io/conan-center-index/pull/12189

petamas commented 2 years ago

FYI @SSE4 and @uilianries