Skip to content

Commit 137c70a

Browse files
Fix cache path issue
1 parent 5628da0 commit 137c70a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

robot_descriptions/_cache.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ def clone_to_cache(description_name: str, commit: Optional[str] = None) -> str:
130130

131131
cache_path = repository.cache_path
132132
if commit is not None:
133-
cache_path += f"-{commit}"
133+
# Requirement: the last directory in the cache path is named after the
134+
# cache path (more precisely the package name) so that package:// URIs
135+
# work in frameworks that resolve them via directories
136+
cache_path = f"{cache_path}-{commit}/{cache_path}"
134137
target_dir = os.path.join(cache_dir, cache_path)
135138
clone = clone_to_directory(
136139
repository.url,

0 commit comments

Comments
 (0)