We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
uv format
1 parent 0bde9e4 commit 9b1328aCopy full SHA for 9b1328a
1 file changed
crates/uv-bin-install/src/lib.rs
@@ -165,8 +165,6 @@ pub async fn bin_install(
165
) -> Result<PathBuf, Error> {
166
let platform = Platform::from_env()?;
167
let platform_name = platform.as_cargo_dist_triple();
168
-
169
- // Check the cache first
170
let cache_entry = CacheEntry::new(
171
cache
172
.bucket(CacheBucket::Binaries)
@@ -176,6 +174,8 @@ pub async fn bin_install(
176
174
binary.executable(),
177
175
);
178
+ // Lock the directory to prevent racing installs
+ let _lock = cache_entry.with_file(".lock").lock().await?;
179
if cache_entry.path().exists() {
180
return Ok(cache_entry.into_path_buf());
181
}
0 commit comments