Skip to content

Commit fc8df06

Browse files
committed
update submodules if the directory doesn't exist
1 parent 2da29db commit fc8df06

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/bootstrap/src/core/config/config.rs

+7
Original file line numberDiff line numberDiff line change
@@ -2888,6 +2888,13 @@ impl Config {
28882888

28892889
let absolute_path = self.src.join(relative_path);
28902890

2891+
// NOTE: This check is required because `jj git clone` doesn't create directories for
2892+
// submodules, they are completely ignored. The code below assumes this directory exists,
2893+
// so create it here.
2894+
if !absolute_path.exists() {
2895+
t!(fs::create_dir_all(&absolute_path));
2896+
}
2897+
28912898
// NOTE: The check for the empty directory is here because when running x.py the first time,
28922899
// the submodule won't be checked out. Check it out now so we can build it.
28932900
if !GitInfo::new(false, &absolute_path).is_managed_git_subrepository()

0 commit comments

Comments
 (0)