Fix bootstrap panic when build from tarball

This commit is contained in:
12101111 2024-05-03 22:53:53 +08:00
parent 561b5dea1e
commit f13edeb451
No known key found for this signature in database
GPG Key ID: 97785FADF38A97DC

View File

@ -2221,13 +2221,8 @@ impl<'a> Builder<'a> {
out
}
/// Return paths of all submodules managed by git.
/// If the current checkout is not managed by git, returns an empty slice.
/// Return paths of all submodules.
pub fn get_all_submodules(&self) -> &[String] {
if !self.rust_info().is_managed_git_subrepository() {
return &[];
}
static SUBMODULES_PATHS: OnceLock<Vec<String>> = OnceLock::new();
let init_submodules_paths = |src: &PathBuf| {