Skip to content

Commit e06ce72

Browse files
committed
Ralf Jung's great idea!
1 parent 610dbdd commit e06ce72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/cargo-miri.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,11 @@ path = "lib.rs"
333333
None => true,
334334
Some(target) => target == rustc_version::version_meta().unwrap().host,
335335
};
336-
let sysroot = if is_host { dir.join("HOST") } else { PathBuf::from(dir) };
337-
336+
let sysroot = if is_host { dir.join("HOST") } else { PathBuf::from(dir) };
337+
338338
std::env::set_var("MIRI_SYSROOT", &sysroot); // pass the env var to the processes we spawn, which will turn it into "--sysroot" flags
339339
if print_env {
340-
println!("MIRI_SYSROOT={:?}", &sysroot); // for Windows users, prints path with backslashes escaped.
340+
println!("MIRI_SYSROOT='{}'", sysroot.display().to_string().replace('\'', r#"'"'"'"#));
341341
} else if !ask_user {
342342
println!("A libstd for Miri is now available in `{}`.", sysroot.display());
343343
}

0 commit comments

Comments
 (0)