Make sure submodules added after first clone are initialized properly
This commit is contained in:
parent
38d85f954a
commit
ad61faaecf
14
src/dvcs.rs
14
src/dvcs.rs
|
@ -233,7 +233,19 @@ impl Repo {
|
|||
.expect("WTF")
|
||||
.success()
|
||||
{
|
||||
// Main updates succeeded
|
||||
// Main updates succeeded. If new submodules were added, initialize them
|
||||
if !Command::new("git")
|
||||
.arg("submodule")
|
||||
.arg("update")
|
||||
.arg("--init")
|
||||
.arg("--recursive")
|
||||
.status()
|
||||
.expect("WTF")
|
||||
.success()
|
||||
{
|
||||
// TODO: Should be forgebuild error message
|
||||
eprintln!("Failed to initialize submodules which were added to the repo");
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
// Main updates failed, return true if there were some submodule updates
|
||||
|
|
Loading…
Reference in New Issue