Skip to content

Commit

Permalink
uv {lock,sync}: propagate index URLs to registry client (#3986)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BurntSushi authored Jun 3, 2024
1 parent a4c73fd commit fbf562d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/uv/src/commands/project/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions crates/uv/src/commands/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions crates/uv/src/commands/project/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit fbf562d

Please sign in to comment.