Fix cwd used for proc macro expansion

This commit is contained in:
Laurențiu Nicola 2024-08-28 13:00:26 +03:00
parent 06a40a61b0
commit 5f7bda743f
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ pub(crate) fn inject_rustc_tool_env(
// NOTE: Technically we should set this for all crates, but that will worsen the deduplication
// logic so for now just keeping it proc-macros ought to be fine.
if kind.is_proc_macro() {
env.set("CARGO_RUSTC_CURRENT_DIR", cargo.manifest_path().to_string());
env.set("CARGO_RUSTC_CURRENT_DIR", cargo.manifest_path().parent().to_string());
}
}