Skip to content

Commit d593da1

Browse files
fengmk2Copilot
andcommitted
Update crates/vite_package_manager/src/package_manager.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: MK (fengmk2) <fengmk2@gmail.com>
1 parent 15dfbe2 commit d593da1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/vite_package_manager/src/package_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl PackageManagerBuilder {
9797
if version == "latest" {
9898
version = get_latest_version(package_manager_type).await?;
9999
should_update_package_manager_field = true;
100-
hash = None; // Reset hash when fetching latest
100+
hash = None; // Reset hash when fetching latest since hash is version-specific
101101
}
102102

103103
// handle yarn >= 2.0.0 to use `@yarnpkg/cli-dist` as package name

crates/vite_package_manager/src/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub async fn download_and_extract_tgz_with_hash(
188188
/// Computes the hash of the given content using the specified digest algorithm.
189189
///
190190
/// # Type Parameters
191-
/// * `D` - A type that implements the [`Digest`](sha2::Digest) trait, such as `Sha256`, `Sha512`, etc.
191+
/// * `D` - A type that implements the [`Digest`] trait, such as `Sha256`, `Sha512`, etc.
192192
///
193193
/// # Arguments
194194
/// * `content` - The byte slice to hash.

0 commit comments

Comments
 (0)