Skip to content

Commit

Permalink
feat(cargo): trim a prefix from cargo package's version (#2652)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Feb 1, 2024
1 parent d79f233 commit 3ae7988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/installpackage/cargo.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (is *Installer) downloadCargo(ctx context.Context, logE *logrus.Entry, pkg
}
logE.Info("Installing a crate")
crate := pkg.PackageInfo.Crate
version := pkg.Package.Version
version := strings.TrimPrefix(strings.TrimPrefix(pkg.Package.Version, pkg.PackageInfo.VersionPrefix), "v")
if err := is.cargoPackageInstaller.Install(ctx, logE, crate, version, root, cargoOpts); err != nil {
return fmt.Errorf("cargo install: %w", err)
}
Expand Down

0 comments on commit 3ae7988

Please sign in to comment.