feat: set username and email

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-08-01 22:40:52 +02:00
parent 5229d30758
commit daf0fc8839
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394

View File

@ -52,9 +52,19 @@ impl VcsClient {
fn exec_git(&self, args: &[&str]) -> anyhow::Result<()> {
match self {
VcsClient::Noop {} => {}
VcsClient::Git { source, .. } => {
VcsClient::Git {
source,
username,
email,
} => {
let checkout_branch = std::process::Command::new("git")
.current_dir(source.as_path())
.args(&[
"-c",
&format!("user.name={}", username),
"-c",
&format!("user.email={}", email),
])
.args(args)
.output()?;