mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
Resolve cache-dir
relative to project root (#7962)
## Summary Unlike other filepath-based settings, the `cache-dir` wasn't being resolved relative to the project root, when specified as an absolute path. Closes https://github.com/astral-sh/ruff/issues/7958.
This commit is contained in:
parent
e261eb7461
commit
8061894af6
1 changed files with 1 additions and 1 deletions
|
@ -377,7 +377,7 @@ impl Configuration {
|
|||
.cache_dir
|
||||
.map(|dir| {
|
||||
let dir = shellexpand::full(&dir);
|
||||
dir.map(|dir| PathBuf::from(dir.as_ref()))
|
||||
dir.map(|dir| fs::normalize_path_to(dir.as_ref(), project_root))
|
||||
})
|
||||
.transpose()
|
||||
.map_err(|e| anyhow!("Invalid `cache-dir` value: {e}"))?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue