Allow uv pip install for unmanaged projects (#5504)

## Summary

Just an oversight.

Closes: https://github.com/astral-sh/uv/issues/5500.
This commit is contained in:
Charlie Marsh 2024-07-26 22:10:18 -04:00 committed by GitHub
parent 24859bd3ee
commit 866d844977
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 49 additions and 7 deletions

View file

@ -736,9 +736,12 @@ impl ProjectWorkspace {
return Ok(None);
};
Ok(Some(
Self::from_project(install_path, lock_path, &project, &pyproject_toml, options).await?,
))
match Self::from_project(install_path, lock_path, &project, &pyproject_toml, options).await
{
Ok(workspace) => Ok(Some(workspace)),
Err(WorkspaceError::NonWorkspace(_)) => Ok(None),
Err(err) => Err(err),
}
}
/// Returns the directory containing the closest `pyproject.toml` that defines the current