Initialize exact release submodule bodies
This commit is contained in:
parent
5d0153276c
commit
2c7a8ff45e
1 changed files with 20 additions and 2 deletions
|
|
@ -228,10 +228,28 @@ impl GitWorktreeGuard {
|
|||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
}
|
||||
Ok(Self {
|
||||
let guard = Self {
|
||||
repo: repo.to_path_buf(),
|
||||
path: path.to_path_buf(),
|
||||
})
|
||||
};
|
||||
let submodules = std::process::Command::new("git")
|
||||
.args([
|
||||
"-c",
|
||||
"core.longpaths=true",
|
||||
"submodule",
|
||||
"update",
|
||||
"--init",
|
||||
"--recursive",
|
||||
])
|
||||
.current_dir(&guard.path)
|
||||
.output()?;
|
||||
if !submodules.status.success() {
|
||||
bail!(
|
||||
"failed to initialize exact release submodules: {}",
|
||||
String::from_utf8_lossy(&submodules.stderr)
|
||||
);
|
||||
}
|
||||
Ok(guard)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue