Skip to content

Commit

Permalink
replace pwd in rust-project.json output #1 (#2272)
Browse files Browse the repository at this point in the history
The generated content uses ${pwd} and in the rust-analyzer server output
I see error logs saying can't find dir with ${pwd} references

Though I'm not sure if this actually affect anything as it seems work
fine most of the time, but I think it maybe good to not have
rust-analyzer errors
  • Loading branch information
ibigbug authored Nov 21, 2023
1 parent e3dd170 commit 364f130
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/rust_analyzer/rust_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ pub fn write_rust_project(
// Render the `rust-project.json` file and replace the exec root
// placeholders with the path to the local exec root.
let rust_project_content = serde_json::to_string(rust_project)?
.replace("${pwd}", execution_root)
.replace("__EXEC_ROOT__", execution_root)
.replace("__OUTPUT_BASE__", output_base);

Expand Down

0 comments on commit 364f130

Please sign in to comment.