Skip to content

Commit

Permalink
Fix bug where submodules wouldn't be updated when running x.py from a…
Browse files Browse the repository at this point in the history
… 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`.
  • Loading branch information
jyn514 committed Nov 26, 2021
1 parent 1e79d79 commit 6e0e220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/lib.rs
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 6e0e220

Please sign in to comment.