diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2021-11-26 09:55:46 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-11-26 09:56:01 -0500 |
| commit | 6e0e22080424e7d8a4b4638bf4fb41e691efb26b (patch) | |
| tree | 3a386b08503b9c10214b0d7a4e95bbbd8cfa95e9 | |
| parent | 1e79d79dac11ce121b972fbaa0db9b0d1756b991 (diff) | |
| download | rust-6e0e22080424e7d8a4b4638bf4fb41e691efb26b.tar.gz rust-6e0e22080424e7d8a4b4638bf4fb41e691efb26b.zip | |
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`.
| -rw-r--r-- | src/bootstrap/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 3b3c8a9227d..1667dfc3f85 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -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; } |
