From 54891f9193894ed689ae463d050b69f568e85e73 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Mon, 7 Jul 2025 11:57:40 +0200 Subject: [PATCH] feat: print error for git user and git mail --- cmd/gogitlabber/git.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/gogitlabber/git.go b/cmd/gogitlabber/git.go index 06fb072..45494c9 100644 --- a/cmd/gogitlabber/git.go +++ b/cmd/gogitlabber/git.go @@ -179,7 +179,10 @@ func pullRepository(repoName string, repoDestination string) { func setGitUserName(repoName string, repoDestination string) { gitUserNameCmd := exec.Command("git", "-C", repoDestination, "config", "user.name", config.GitUserName) - gitUserNameCmd.CombinedOutput() + _, err := gitUserNameCmd.CombinedOutput() + if err != nil { + logger.Print("ERROR: %v\n", err) + } logger.Print("Setting git username for: "+repoName, nil) } @@ -188,7 +191,10 @@ func setGitUserName(repoName string, repoDestination string) { func setGitUserMail(repoName string, repoDestination string) { gitUserMailCmd := exec.Command("git", "-C", repoDestination, "config", "user.mail", config.GitUserMail) - gitUserMailCmd.CombinedOutput() + _, err := gitUserMailCmd.CombinedOutput() + if err != nil { + logger.Print("ERROR: %v\n", err) + } logger.Print("Setting git email for: "+repoName, nil) }