mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-22 12:35:36 +00:00
Don't panic in uv export --frozen when the lockfile is outdated (#16407)
Provide a good error message when the discovered workspace members mismatch with the locked workspace members in `uv export --frozen`, instead of panicking. Fixes #16406
This commit is contained in:
parent
940a3f63ce
commit
491293362f
7 changed files with 71 additions and 8 deletions
|
|
@ -1269,7 +1269,7 @@ impl Lock {
|
|||
/// Returns the package with the given name. If there are multiple
|
||||
/// matching packages, then an error is returned. If there are no
|
||||
/// matching packages, then `Ok(None)` is returned.
|
||||
fn find_by_name(&self, name: &PackageName) -> Result<Option<&Package>, String> {
|
||||
pub fn find_by_name(&self, name: &PackageName) -> Result<Option<&Package>, String> {
|
||||
let mut found_dist = None;
|
||||
for dist in &self.packages {
|
||||
if &dist.id.name == name {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue