Skip to content

Commit 2110085

Browse files
stephane-caronStéphane Caron
authored andcommitted
Append commit to repo path when commit-pinning
1 parent 4fe8e6f commit 2110085

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
@@ -131,7 +131,10 @@ def clone_to_cache(description_name: str, commit: Optional[str] = None) -> str:
131131
)
132132
)
133133

134-
target_dir = os.path.join(cache_dir, repository.cache_path)
134+
cache_path = repository.cache_path
135+
if commit is not None:
136+
cache_path += f"-{commit}"
137+
target_dir = os.path.join(cache_dir, cache_path)
135138
clone = clone_to_directory(
136139
repository.url,
137140
target_dir,

0 commit comments

Comments
 (0)