]> git.lizzy.rs Git - rust.git/commitdiff
Ralf Jung's great idea!
authorYOUNGSUK_KIM <ykim837@gatech.edu>
Tue, 15 Oct 2019 00:57:57 +0000 (20:57 -0400)
committerYOUNGSUK_KIM <ykim837@gatech.edu>
Tue, 15 Oct 2019 00:57:57 +0000 (20:57 -0400)
src/bin/cargo-miri.rs

index 521ac8fa065cedbbcc8cd021d13cda5416140aa7..3af5a2b35db35b23de42ad5dcdc14801e6694c07 100644 (file)
@@ -333,11 +333,11 @@ fn setup(ask_user: bool) {
         None => true,
         Some(target) => target == rustc_version::version_meta().unwrap().host,
     };
-    let sysroot = if is_host { dir.join("HOST") } else { PathBuf::from(dir) }; 
-    
+    let sysroot = if is_host { dir.join("HOST") } else { PathBuf::from(dir) };
+
     std::env::set_var("MIRI_SYSROOT", &sysroot); // pass the env var to the processes we spawn, which will turn it into "--sysroot" flags
     if print_env {
-        println!("MIRI_SYSROOT={:?}", &sysroot); // for Windows users, prints path with backslashes escaped.
+        println!("MIRI_SYSROOT='{}'", sysroot.display().to_string().replace('\'', r#"'"'"'"#));
     } else if !ask_user {
         println!("A libstd for Miri is now available in `{}`.", sysroot.display());
     }