Auto merge of #16755 - Veykril:rustup-bins, r=Veykril

For toolchain binaries use the full path found in $PATH

Fixes https://github.com/rust-lang/rust-analyzer/issues/16754
This commit is contained in:
bors 2024-03-06 14:47:32 +00:00
commit b85d38f7d6
12 changed files with 117 additions and 131 deletions

View file

@ -2002,7 +2002,7 @@ fn run_rustfmt(
let mut command = match snap.config.rustfmt() {
RustfmtConfig::Rustfmt { extra_args, enable_range_formatting } => {
// FIXME: Set RUSTUP_TOOLCHAIN
let mut cmd = process::Command::new(toolchain::rustfmt());
let mut cmd = process::Command::new(toolchain::Tool::Rustfmt.path());
cmd.envs(snap.config.extra_env());
cmd.args(extra_args);