Fix parsing semver number in entry.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2024-11-09 12:31:28 +11:00 committed by GitHub
parent 15e775a916
commit b06d6a22a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -616,9 +616,9 @@ pub fn self_install(
name: CompactString::const_new("cargo-binstall"),
version_req: CompactString::const_new("*"),
current_version: Version::new(
env!("CARGO_PKG_VERSION_MAJOR").try_into().unwrap(),
env!("CARGO_PKG_VERSION_MINOR").try_into().unwrap(),
env!("CARGO_PKG_VERSION_PATCH").try_into().unwrap(),
env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(),
env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(),
env!("CARGO_PKG_VERSION_PATCH").parse().unwrap(),
),
source: CrateSource::cratesio_registry(),
target: CompactString::const_new(TARGET),