Skip to content

Commit 50a7256

Browse files
committed
Canonicalize path to current directory for use in prefix stripping
1 parent 7a08f84 commit 50a7256

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bootstrap/src/core/builder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,9 @@ impl StepDescription {
439439
}
440440

441441
// strip CurDir prefix if present
442-
let mut paths: Vec<_> = paths.iter().map(|p| p.strip_prefix(".").unwrap_or(p)).collect();
442+
let curdir_path = PathBuf::from(".").canonicalize().unwrap();
443+
let mut paths: Vec<_> =
444+
paths.iter().map(|p| p.strip_prefix(&curdir_path).unwrap_or(p)).collect();
443445

444446
remap_paths(&mut paths);
445447

0 commit comments

Comments
 (0)