From 909b69dfa20a40d623e4923ace044dcc93c39b22 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 26 Jun 2024 16:32:13 -0400 Subject: [PATCH] Respect constraints passed in `uv tool install --from` (#4563) I accidentally trimmed this to just the `requirement.name` --- crates/uv/src/commands/tool/install.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uv/src/commands/tool/install.rs b/crates/uv/src/commands/tool/install.rs index a5af7aef0..bf8a80183 100644 --- a/crates/uv/src/commands/tool/install.rs +++ b/crates/uv/src/commands/tool/install.rs @@ -78,13 +78,13 @@ pub(crate) async fn install( false }; - let requirements = [Requirement::from_str(from.name.as_ref())] + let requirements = [Ok(from.clone())] .into_iter() .chain(with.iter().map(|name| Requirement::from_str(name))) .collect::>, _>>()?; // TODO(zanieb): Duplicative with the above parsing but needed for `update_environment` - let requirements_sources = [RequirementsSource::from_package(from.name.to_string())] + let requirements_sources = [RequirementsSource::from_package(from.to_string())] .into_iter() .chain(with.into_iter().map(RequirementsSource::from_package)) .collect::>();