From 01592eb7c227ec12304635e530984d29055463d7 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Sun, 28 Apr 2024 07:49:18 -0500 Subject: [PATCH] Always consider .dsv files, even when no shell specific script exists (#147) Copy of https://github.com/colcon/colcon-core/pull/244/commits/3697164b248d578ec15e9f0d369d005cf1d9894a Signed-off-by: Addisu Z. Taddese --- ament_package/template/prefix_level/_local_setup_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ament_package/template/prefix_level/_local_setup_util.py b/ament_package/template/prefix_level/_local_setup_util.py index fe2afda..813bd8a 100644 --- a/ament_package/template/prefix_level/_local_setup_util.py +++ b/ament_package/template/prefix_level/_local_setup_util.py @@ -252,11 +252,11 @@ def process_dsv_file( else: # group remaining source lines by basename path_without_ext, ext = os.path.splitext(remainder) + if path_without_ext not in basenames: + basenames[path_without_ext] = set() assert ext.startswith('.') ext = ext[1:] if ext in (primary_extension, additional_extension): - if path_without_ext not in basenames: - basenames[path_without_ext] = set() basenames[path_without_ext].add(ext) # add the dsv extension to each basename if the file exists