From 90e6dc61b3ebde4d245c110d0d3919250bb3d0ae Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 22 Nov 2024 13:33:36 -0600 Subject: [PATCH] Fix return value from CMAKE_MODULE_PATH hook (#147) This was a regression introduced by 5704d8376d5b6c354943f1e7b3fd887f51b560b5 which was hidden by some nuanced API characteristics for environment hook extensions, which would manifest as silently missing environment hooks for CMAKE_MODULE_PATH. --- colcon_cmake/environment/cmake_module_path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colcon_cmake/environment/cmake_module_path.py b/colcon_cmake/environment/cmake_module_path.py index b1ef9ec..ff93732 100644 --- a/colcon_cmake/environment/cmake_module_path.py +++ b/colcon_cmake/environment/cmake_module_path.py @@ -44,7 +44,7 @@ def create_environment_hooks(self, prefix_path, pkg_name): # noqa: D102 str(path.relative_to(prefix_path)), mode='prepend') - return hooks.values() + return [hook for hook_list in hooks.values() for hook in hook_list] def _get_potential_cmake_module_paths(self, prefix_path, pkg_name): paths = []