uv
2a66349e - Check if relative URL is valid directory before treating as index (#13917)

Commit
207 days ago
Check if relative URL is valid directory before treating as index (#13917) As per #13874, passing a relative URL like `test` to `--index` for `uv add` causes unexpected behavior if the directory does not exist. The non-existent index is effectively ignored and uv falls back to PyPI. If a package is found there, the spurious index is then written to `pyproject.toml`. This doesn't happen for `--default-index` since resolution will fail without fallback to PyPI. This PR adds a validation step for indexes provided on the command line. If a directory does not exist, uv will fail with an error. Closes #13874
Author
Parents
Loading