From dab7fc7e9f0710f7e4388d46fbafafbac68016a8 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 15 Jul 2024 13:56:07 -0400 Subject: [PATCH] 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 --- crates/uv-distribution/src/source/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv-distribution/src/source/mod.rs b/crates/uv-distribution/src/source/mod.rs index 92d3ece68..ce12c933e 100644 --- a/crates/uv-distribution/src/source/mod.rs +++ b/crates/uv-distribution/src/source/mod.rs @@ -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")) .await .map_err(Error::CacheWrite)?; - fs_err::tokio::rename(extracted, target) + rename_with_retry(extracted, target) .await .map_err(Error::CacheWrite)?;