Allow managed downloads with --python-preference system (#8808)

Closes https://github.com/astral-sh/uv/issues/8804
This commit is contained in:
Zanie Blue 2024-11-04 07:45:24 -06:00 committed by GitHub
parent d82607d038
commit 6250b900b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1546,7 +1546,10 @@ impl PythonPreference {
}
pub(crate) fn allows_managed(self) -> bool {
matches!(self, Self::Managed | Self::OnlyManaged)
match self {
Self::OnlySystem => false,
Self::Managed | Self::System | Self::OnlyManaged => true,
}
}
}