diff options
| author | bors <bors@rust-lang.org> | 2016-07-30 10:11:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-30 10:11:33 -0700 |
| commit | 7f7969ef44af9e7f060e7a505366a7925e4470c2 (patch) | |
| tree | 9d0d5a5f151e0127de3f78c0519c17e1f3c8c432 /src/bootstrap | |
| parent | ffcbd2deb5ca953512a20785224120437cb310f0 (diff) | |
| parent | 4ffbb5dd63ebc584291143ccc8e9d849e9c485d1 (diff) | |
| download | rust-7f7969ef44af9e7f060e7a505366a7925e4470c2.tar.gz rust-7f7969ef44af9e7f060e7a505366a7925e4470c2.zip | |
Auto merge of #35117 - aravind-pg:path, r=alexcrichton
On Windows, ensure PATH does not contain invalid character `"` Fixes #34959. r? @alexcrichton
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/sanity.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 7c0f09c322f..73749246758 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -31,6 +31,15 @@ use Build; pub fn check(build: &mut Build) { let mut checked = HashSet::new(); let path = env::var_os("PATH").unwrap_or(OsString::new()); + // On Windows, quotes are invalid characters for filename paths, and if + // one is present as part of the PATH then that can lead to the system + // being unable to identify the files properly. See + // https://github.com/rust-lang/rust/issues/34959 for more details. + if cfg!(windows) { + if path.to_string_lossy().contains("\"") { + panic!("PATH contains invalid character '\"'"); + } + } let mut need_cmd = |cmd: &OsStr| { if !checked.insert(cmd.to_owned()) { return |
