mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +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
|
@ -20,7 +20,6 @@ pypi-types = { workspace = true }
|
|||
uv-fs = { workspace = true, features = ["tokio"] }
|
||||
uv-normalize = { workspace = true }
|
||||
|
||||
cachedir = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive", "env"], optional = true }
|
||||
directories = { workspace = true }
|
||||
fs-err = { workspace = true, features = ["tokio"] }
|
||||
|
|
|
@ -13,7 +13,7 @@ use tracing::debug;
|
|||
|
||||
use distribution_types::InstalledDist;
|
||||
use pypi_types::Metadata23;
|
||||
use uv_fs::directories;
|
||||
use uv_fs::{cachedir, directories};
|
||||
use uv_normalize::PackageName;
|
||||
|
||||
pub use crate::by_timestamp::CachedByTimestamp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue