Retry on permission errors when persisting extracted source distributions to the cache (#5076)

Another case for https://github.com/astral-sh/uv/issues/1491

ref #4606
This commit is contained in:
Zanie Blue 2024-07-15 13:56:07 -04:00 committed by GitHub
parent 563507edba
commit dab7fc7e9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1320,7 +1320,7 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
fs_err::tokio::create_dir_all(target.parent().expect("Cache entry to have parent")) fs_err::tokio::create_dir_all(target.parent().expect("Cache entry to have parent"))
.await .await
.map_err(Error::CacheWrite)?; .map_err(Error::CacheWrite)?;
fs_err::tokio::rename(extracted, target) rename_with_retry(extracted, target)
.await .await
.map_err(Error::CacheWrite)?; .map_err(Error::CacheWrite)?;