Skip to content

Commit

Permalink
bundler: Fix name for git repos in config file
Browse files Browse the repository at this point in the history
The name of the cached git repository comes from git URL, not from the
name declared in the Gemfile. We use `repo_name` property for that in
the `GitDependency` class [1]. Reuse the property for the cache path in
the bundler config file as well.

---
[1]: https://github.com/containerbuildsystem/cachi2/blob/main/cachi2/core/package_managers/bundler/parser.py#L143

Signed-off-by: Michal Šoltis <[email protected]>
  • Loading branch information
slimreaper35 committed Dec 19, 2024
1 parent 6bc7c2a commit 52c7c97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cachi2/core/package_managers/bundler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _resolve_bundler_package(
else:
properties = []
if isinstance(dep, GitDependency):
git_paths.append((dep.name, dep.name + "-" + dep.ref[:12]))
git_paths.append((dep.name, dep.repo_name + "-" + dep.ref[:12]))

c = Component(name=dep.name, version=dep.version, purl=dep.purl, properties=properties)
components.append(c)
Expand Down

0 comments on commit 52c7c97

Please sign in to comment.