Skip to content

Commit

Permalink
Rollup merge of rust-lang#91252 - jyn514:relative-dir, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
matthiaskrgr authored Nov 26, 2021
2 parents a92f867 + 6e0e220 commit 404235e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl Build {

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

Expand Down

0 comments on commit 404235e

Please sign in to comment.