Skip to content

Commit

Permalink
Fix configuring git
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperMalachowski committed Oct 21, 2024
1 parent 07fff18 commit a9c7504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/github/bumper/bumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,15 +455,15 @@ func getTreeRef(stderr io.Writer, refname string, opts ...CallOption) (string, e

func configureGit(name, email string) error {
// Configure Git to fix the dubious ownership of the workspace directory
additionalArgs := []string{"config", "user.email", email}
additionalArgs := []string{"config", "--global", "user.email", email}
logrus.WithField("cmd", gitCmd).WithField("args", additionalArgs).Info("running command ...")
additionalOutput, configErr := exec.Command(gitCmd, additionalArgs...).CombinedOutput()
if configErr != nil {
logrus.WithField("cmd", gitCmd).Debugf("output is '%s'", string(additionalOutput))
return fmt.Errorf("running command %s %s: %w", gitCmd, additionalArgs, configErr)
}

additionalArgs2 := []string{"config", "user.name", name}
additionalArgs2 := []string{"config", "--global", "user.name", name}
logrus.WithField("cmd", gitCmd).WithField("args", additionalArgs2).Info("running command ...")
additionalOutput2, configErr := exec.Command(gitCmd, additionalArgs2...).CombinedOutput()
if configErr != nil {
Expand Down

0 comments on commit a9c7504

Please sign in to comment.