We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ffcbd2d + 4ffbb5d commit 7f7969eCopy full SHA for 7f7969e
src/bootstrap/sanity.rs
@@ -31,6 +31,15 @@ use Build;
31
pub fn check(build: &mut Build) {
32
let mut checked = HashSet::new();
33
let path = env::var_os("PATH").unwrap_or(OsString::new());
34
+ // On Windows, quotes are invalid characters for filename paths, and if
35
+ // one is present as part of the PATH then that can lead to the system
36
+ // being unable to identify the files properly. See
37
+ // https://github.com/rust-lang/rust/issues/34959 for more details.
38
+ if cfg!(windows) {
39
+ if path.to_string_lossy().contains("\"") {
40
+ panic!("PATH contains invalid character '\"'");
41
+ }
42
43
let mut need_cmd = |cmd: &OsStr| {
44
if !checked.insert(cmd.to_owned()) {
45
return
0 commit comments