mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-22 16:22:09 +00:00
Respect --index-url
provided via requirements.txt (#1719)
## Summary When we read `--index-url` from a `requirements.txt`, we attempt to respect the `--index-url` provided by the CLI if it exists. Unfortunately, `--index-url` from the CLI has a default value... so we _never_ respect the `--index-url` in the requirements file. This PR modifies the CLI to use `None`, and moves the default into logic in the `IndexLocations `struct. Closes https://github.com/astral-sh/uv/issues/1692.
This commit is contained in:
parent
7b2c93f9fb
commit
034f62b24f
7 changed files with 153 additions and 55 deletions
|
@ -160,7 +160,9 @@ impl RegistryClient {
|
|||
Err(CachedClientError::Client(err)) => match err.into_kind() {
|
||||
ErrorKind::Offline(_) => continue,
|
||||
ErrorKind::RequestError(err) => {
|
||||
if err.status() == Some(StatusCode::NOT_FOUND) {
|
||||
if err.status() == Some(StatusCode::NOT_FOUND)
|
||||
|| err.status() == Some(StatusCode::FORBIDDEN)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Err(ErrorKind::RequestError(err).into())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue