Skip to content

Commit

Permalink
Avoid fatal error when searching for egg-info with missing directory (#…
Browse files Browse the repository at this point in the history
…7498)

## Summary

Closes #7485.

## Test Plan

```
$ cargo run cache clean
$ cargo run venv
$ cargo run pip install django-allauth==0.51.0
$ cargo run venv
$ cargo run pip install django-allauth==0.51.0
```
  • Loading branch information
charliermarsh authored Sep 18, 2024
1 parent f942561 commit 97ae811
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/uv-distribution/src/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,9 @@ async fn read_egg_info(
let egg_info = match find_egg_info(directory.as_ref()) {
Ok(Some(path)) => path,
Ok(None) => return Err(Error::MissingEggInfo),
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {
return Err(Error::MissingEggInfo)
}
Err(err) => return Err(Error::CacheRead(err)),
};

Expand Down

0 comments on commit 97ae811

Please sign in to comment.