Skip to content

Commit

Permalink
Merge pull request #506 from victor-dumitrescu/build
Browse files Browse the repository at this point in the history
build.rs: check that cargo binary exists, use exported one otherwise
  • Loading branch information
mkroening authored Nov 28, 2023
2 parents 892dd44 + 5aa584a commit 0def056
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hermit/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ fn cargo() -> Command {
// To reach the rustup proxy nonetheless, we explicitly query $CARGO_HOME.
let mut cargo_home = PathBuf::from(env::var_os("CARGO_HOME").unwrap());
cargo_home.push("bin/cargo");
cargo_home
if cargo_home.exists() {
cargo_home
} else {
PathBuf::from("cargo")
}
};

let mut cargo = Command::new(cargo);
Expand Down

0 comments on commit 0def056

Please sign in to comment.