Skip to content

Commit

Permalink
fix(xtask): assume exe exists in cargo_home
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Jan 3, 2025
1 parent af9db45 commit cfe44bf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cfe44bf

Please sign in to comment.