uv {lock,sync}: propagate index URLs to registry client (#3986)

Otherwise the `uv lock` command wasn't respecting the index URL option.

This is a follow-up to #3984, and I believe should now allow #3970 to be
merged.
This commit is contained in:
Andrew Gallant
2024-06-03 10:38:36 -04:00
committed by GitHub
parent a4c73fd07e
commit fbf562d5a8
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -99,6 +99,7 @@ pub(super) async fn do_lock(
// Initialize the registry client.
// TODO(zanieb): Support client options e.g. offline, tls, etc.
let client = RegistryClientBuilder::new(cache.clone())
.index_urls(index_locations.index_urls())
.markers(markers)
.platform(venv.interpreter().platform())
.build();
+1
View File
@@ -157,6 +157,7 @@ pub(crate) async fn update_environment(
// TODO(zanieb): Support client options e.g. offline, tls, etc.
let client = RegistryClientBuilder::new(cache.clone())
.connectivity(connectivity)
.index_urls(index_locations.index_urls())
.markers(markers)
.platform(venv.interpreter().platform())
.build();
+1
View File
@@ -90,6 +90,7 @@ pub(super) async fn do_sync(
// Initialize the registry client.
// TODO(zanieb): Support client options e.g. offline, tls, etc.
let client = RegistryClientBuilder::new(cache.clone())
.index_urls(index_locations.index_urls())
.markers(markers)
.platform(venv.interpreter().platform())
.build();