mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Use fs_err for cachedir errors (#3304)
When running ``` set UV_CACHE_DIR=%LOCALAPPDATA%\uv\cache-foo && uv venv venv ``` in windows CMD, the error would be just ``` error: The system cannot find the path specified. (os error 3) ``` The problem is that the first action in the cache dir is adding the tag, and the `cachedir` crate is using `std::fs` instead of `fs_err`. I've copied the two functions we use from the crate and changed the import from `std::fs` to `fs_err`. The new error is ``` error: failed to open file `C:\Users\Konstantin\AppData\Local\uv\cache-foo \CACHEDIR.TAG` Caused by: The system cannot find the path specified. (os error 3) ``` which correctly explains the problem. Closes #3280
This commit is contained in:
parent
22d8619c37
commit
1344cfae4b
10 changed files with 78 additions and 7 deletions
|
@ -29,7 +29,6 @@ uv-interpreter = { workspace = true }
|
|||
uv-version = { workspace = true }
|
||||
|
||||
anstream = { workspace = true }
|
||||
cachedir = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive"], optional = true }
|
||||
directories = { workspace = true }
|
||||
fs-err = { workspace = true }
|
||||
|
|
|
@ -12,7 +12,7 @@ use pypi_types::Scheme;
|
|||
use tracing::info;
|
||||
|
||||
use crate::{Error, Prompt};
|
||||
use uv_fs::Simplified;
|
||||
use uv_fs::{cachedir, Simplified};
|
||||
use uv_interpreter::{Interpreter, Virtualenv};
|
||||
use uv_version::version;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue