Skip to content

Commit

Permalink
Include in searched paths in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
linsword13 committed Jan 23, 2025
1 parent fa03a17 commit f64c385
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ramble/ramble/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -2314,14 +2314,17 @@ def _get_template_config(obj, tpl_config, obj_type):
# Search up the object chain to resolve source path
found = False
object_paths = [e[1] for e in ramble.repository.list_object_files(obj, obj_type)]
searched_paths = []
for obj_path in object_paths:
src_path = os.path.join(os.path.dirname(obj_path), src_path_config)
if os.path.isfile(src_path):
found = True
break
searched_paths.append(src_path)
if not found:
raise ApplicationError(
f"Object {obj.name} is missing template file at {src_path_config}"
f"Object {obj.name} is missing template file {src_path_config}. "
f"Searched paths: {searched_paths}"
)
else:
if not os.path.isfile(src_path_config):
Expand Down

0 comments on commit f64c385

Please sign in to comment.