From cfe44bf2f5a2b2e2b4c8c69b430488d1c780545c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 3 Jan 2025 11:54:04 +0100 Subject: [PATCH] fix(xtask): assume exe exists in `cargo_home` --- xtask/src/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 6fee72dc03..6133ece4df 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -11,7 +11,7 @@ mod clippy; mod doc; use std::env; -use std::path::{Path, PathBuf}; +use std::path::Path; use std::process::Command; use anyhow::Result; @@ -74,11 +74,7 @@ fn sanitize(cmd: &str) -> Command { let mut cargo_home = home::cargo_home().unwrap(); cargo_home.push("bin"); cargo_home.push(&exe); - if cargo_home.exists() { - cargo_home - } else { - PathBuf::from(exe) - } + cargo_home }; let mut cmd = Command::new(cmd);