Skip to content

Commit 89dd52e

Browse files
authored
Merge pull request #44 from hermit-os/cargo-home
fix(build.rs): use canonical `cargo_home` location
2 parents e0aeb3c + f8f0321 commit 89dd52e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

rftrace/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ default = []
3131
crate-type = ['staticlib', 'rlib']
3232

3333
[build-dependencies]
34+
home = "0.5"
3435
llvm-tools = "0.1"
3536

3637
#[profile.dev]

rftrace/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn sanitize(cmd: &str) -> Command {
9999
let exe = format!("{cmd}{}", env::consts::EXE_SUFFIX);
100100
// On windows, the userspace toolchain ends up in front of the rustup proxy in $PATH.
101101
// To reach the rustup proxy nonetheless, we explicitly query $CARGO_HOME.
102-
let mut cargo_home = PathBuf::from(env::var_os("CARGO_HOME").unwrap());
102+
let mut cargo_home = home::cargo_home().unwrap();
103103
cargo_home.push("bin");
104104
cargo_home.push(&exe);
105105
if cargo_home.exists() {

0 commit comments

Comments
 (0)