Skip to content

Commit e248523

Browse files
dvtkrlbsmejrs
andauthored
Update src/bootstrap/config.rs
Co-authored-by: Bruno Kolenbrander <[email protected]>
1 parent 0bb4e25 commit e248523

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/bootstrap/config.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,14 @@ impl Config {
821821
.and_then(|output| if output.status.success() { Some(output) } else { None });
822822
if let Some(output) = output {
823823
let git_root = String::from_utf8(output.stdout).unwrap();
824-
config.src = PathBuf::from(git_root.trim().to_owned())
824+
let git_root = PathBuf::from(git_root.trim()).canonicalize().unwrap();
825+
let s = git_root.to_str().unwrap();
826+
827+
// Bootstrap is quite bad at handling /? in front of paths
828+
config.src = match s.strip_prefix("\\\\?\\") {
829+
Some(p) => PathBuf::from(p),
830+
None => PathBuf::from(git_root),
831+
};
825832
} else {
826833
// We're building from a tarball, not git sources.
827834
// We don't support pre-downloaded bootstrap in this case.

0 commit comments

Comments
 (0)