Skip to content

Commit 6e0e220

Browse files
committed
Fix bug where submodules wouldn't be updated when running x.py from a subdirectory
Previously, it would concatenate the relative path to the current subdirectory, which looked at the wrong folder. I tested this by checking out `1.56.1`, changing the current directory to `src/`, and running `../x.py build`.
1 parent 1e79d79 commit 6e0e220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ impl Build {
493493

494494
// NOTE: The check for the empty directory is here because when running x.py the first time,
495495
// the submodule won't be checked out. Check it out now so we can build it.
496-
if !channel::GitInfo::new(false, relative_path).is_git() && !dir_is_empty(&absolute_path) {
496+
if !channel::GitInfo::new(false, &absolute_path).is_git() && !dir_is_empty(&absolute_path) {
497497
return;
498498
}
499499

0 commit comments

Comments
 (0)