Skip to content

Commit

Permalink
fix(cargo): normalize the install path of cargo packages (#3365)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Dec 15, 2024
1 parent c66848e commit 5737f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (p *Package) PkgPath(rootDir string, rt *runtime.Runtime) (string, error) {
return filepath.Join(rootDir, "pkgs", pkgInfo.Type, p, pkg.Version, "bin"), nil
case PkgInfoTypeCargo:
registry := "crates.io"
return filepath.Join(rootDir, "pkgs", pkgInfo.Type, registry, pkgInfo.Crate, pkg.Version), nil
return filepath.Join(rootDir, "pkgs", pkgInfo.Type, registry, pkgInfo.Crate, strings.TrimPrefix(pkg.Version, "v")), nil
case PkgInfoTypeGitHubContent, PkgInfoTypeGitHubRelease:
if pkgInfo.RepoOwner == "aquaproj" && (pkgInfo.RepoName == "aqua" || pkgInfo.RepoName == "aqua-proxy") {
return filepath.Join(rootDir, "internal", "pkgs", pkgInfo.Type, "github.com", pkgInfo.RepoOwner, pkgInfo.RepoName, pkg.Version, assetName), nil
Expand Down

0 comments on commit 5737f8b

Please sign in to comment.