Skip to content

Commit 404235e

Browse files
authored
Rollup merge of rust-lang#91252 - jyn514:relative-dir, r=Mark-Simulacrum
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`. Fixes rust-lang#90481 (cc `@pnkfelix).` r? `@Mark-Simulacrum`
2 parents a92f867 + 6e0e220 commit 404235e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/lib.rs

Lines changed: 1 addition & 1 deletion
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)