Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv crashes if the temporary directory does not exists #6878

Closed
gaborbernat opened this issue Aug 30, 2024 · 1 comment · Fixed by #6929
Closed

uv crashes if the temporary directory does not exists #6878

gaborbernat opened this issue Aug 30, 2024 · 1 comment · Fixed by #6929
Labels
bug Something isn't working

Comments

@gaborbernat
Copy link
Contributor

❯ uv venv -p 3.12
Using Python 3.12.5 interpreter at: /Users/bgabor8/.pyenv/versions/3.12.5/bin/python3.12
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate.fish

❯ env TMPDIR=.tmp uv pip install httpx
thread 'main' panicked at crates/uv-client/src/registry_client.rs:144:34:
called `Result::unwrap()` on an `Err` value: Custom { kind: NotFound, error: PathError { path: "/Users/bgabor8/git/testing/.tmp/.tmpwFhPkz", err: Os { code: 2, kind: NotFound, message: "No such file or directory" } } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I think uv should create the folder if it does not exist rather than crash.

@charliermarsh charliermarsh added the bug Something isn't working label Aug 30, 2024
konstin added a commit that referenced this issue Sep 2, 2024
Forward an error for missing temp directories:

```
$ env TMPDIR=.tmp uv-debug pip install httpx
  error: No such file or directory (os error 2) at path "/home/konsti/projects/uv/.tmp/.tmpgIBhhh"
```

Fixes #6878
@gaborbernat
Copy link
Contributor Author

Is there a reason why this needs to be an error and why we wouldn't instead just create this directory if it does not exist? That would be a much better user experience from my point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants