mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Fix loading of cached metadata for git distributions with subdirectories (#6094)
Applies the same fix as https://github.com/astral-sh/uv/issues/5944 to cache loads Closes https://github.com/astral-sh/uv/issues/6093
This commit is contained in:
parent
981b7ca5ec
commit
dc67023677
1 changed files with 8 additions and 2 deletions
|
@ -1226,12 +1226,18 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
|||
.is_fresh()
|
||||
{
|
||||
if let Some(metadata) = read_cached_metadata(&metadata_entry).await? {
|
||||
let path = if let Some(subdirectory) = resource.subdirectory {
|
||||
Cow::Owned(fetch.path().join(subdirectory))
|
||||
} else {
|
||||
Cow::Borrowed(fetch.path())
|
||||
};
|
||||
|
||||
debug!("Using cached metadata for: {source}");
|
||||
return Ok(ArchiveMetadata::from(
|
||||
Metadata::from_workspace(
|
||||
metadata,
|
||||
fetch.path(),
|
||||
fetch.path(),
|
||||
&path,
|
||||
&path,
|
||||
self.build_context.sources(),
|
||||
self.preview_mode,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue