Skip to content

Commit

Permalink
Resolve cache-dir relative to project root
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Oct 14, 2023
1 parent ddffadb commit 5b48559
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff_workspace/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"))?,
Expand Down
2 changes: 2 additions & 0 deletions crates/ruff_workspace/src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ fn resolve_configuration(
let project_root = relativity.resolve(&path);
let configuration = Configuration::from_options(options, &project_root)?;

println!("project_root: {:?}", project_root);

// If extending, continue to collect.
next = configuration.extend.as_ref().map(|extend| {
fs::normalize_path_to(
Expand Down

0 comments on commit 5b48559

Please sign in to comment.