For toolchain binaries ue the full path found in $PATH

This commit is contained in:
Lukas Wirth 2024-03-05 10:16:30 +01:00
parent fe0daa7be3
commit c310aee8d6
7 changed files with 63 additions and 67 deletions

View file

@ -189,7 +189,7 @@ fn _format(
let &crate_id = db.relevant_crates(file_id).iter().next()?;
let edition = db.crate_graph()[crate_id].edition;
let mut cmd = std::process::Command::new(toolchain::rustfmt());
let mut cmd = std::process::Command::new(toolchain::Tool::Rustfmt.path());
cmd.arg("--edition");
cmd.arg(edition.to_string());