From 364f13047747894983e53e12447e160a749473c1 Mon Sep 17 00:00:00 2001 From: Yuwei Ba Date: Tue, 21 Nov 2023 22:18:41 +1100 Subject: [PATCH] replace pwd in rust-project.json output #1 (#2272) 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 --- tools/rust_analyzer/rust_project.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/rust_analyzer/rust_project.rs b/tools/rust_analyzer/rust_project.rs index 7f931cf6f6..e4314a23d1 100644 --- a/tools/rust_analyzer/rust_project.rs +++ b/tools/rust_analyzer/rust_project.rs @@ -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);