@@ -37,7 +37,7 @@ func EnsureUserAndEmailSetup(gitter Interface, dir string, gitUserName string, g
3737 }
3838 }
3939 }
40- _ , err := gitter .Command (dir , "config" , "--global" , "-- add" , "user.name" , userName )
40+ _ , err := gitter .Command (dir , "config" , "--add" , "user.name" , userName )
4141 if err != nil {
4242 return userName , userEmail , fmt .Errorf ("Failed to set the git username to %s: %w" , userName , err )
4343 }
@@ -50,7 +50,7 @@ func EnsureUserAndEmailSetup(gitter Interface, dir string, gitUserName string, g
5050 userEmail = DefaultGitUserEmail
5151 }
5252 }
53- _ , err := gitter .Command (dir , "config" , "--global" , "-- add" , "user.email" , userEmail )
53+ _ , err := gitter .Command (dir , "config" , "--add" , "user.email" , userEmail )
5454 if err != nil {
5555 return userName , userEmail , fmt .Errorf ("Failed to set the git email to %s: %w" , userEmail , err )
5656 }
@@ -68,8 +68,8 @@ func SetUserAndEmail(gitter Interface, dir string, gitUserName string, gitUserEm
6868 userEmail = gitUserEmail
6969 } else {
7070 // lets load the current values and if they are specified lets not modify them as they are probably correct
71- userName , _ = gitter .Command (dir , "config" , "--global" , "-- get" , "user.name" )
72- userEmail , _ = gitter .Command (dir , "config" , "--global" , "-- get" , "user.email" )
71+ userName , _ = gitter .Command (dir , "config" , "--get" , "user.name" )
72+ userEmail , _ = gitter .Command (dir , "config" , "--get" , "user.email" )
7373
7474 if userName != "" && userEmail != "" {
7575 log .Logger ().Infof ("have git user name %s and email %s setup already so not going to modify them" , userName , userEmail )
@@ -91,7 +91,7 @@ func SetUserAndEmail(gitter Interface, dir string, gitUserName string, gitUserEm
9191 }
9292 }
9393 }
94- _ , err := gitter .Command (dir , "config" , "--global" , "-- add" , "user.name" , userName )
94+ _ , err := gitter .Command (dir , "config" , "--add" , "user.name" , userName )
9595 if err != nil {
9696 return userName , userEmail , fmt .Errorf ("Failed to set the git username to %s: %w" , userName , err )
9797 }
@@ -104,7 +104,7 @@ func SetUserAndEmail(gitter Interface, dir string, gitUserName string, gitUserEm
104104 userEmail = DefaultGitUserEmail
105105 }
106106 }
107- _ , err = gitter .Command (dir , "config" , "--global" , "-- add" , "user.email" , userEmail )
107+ _ , err = gitter .Command (dir , "config" , "--add" , "user.email" , userEmail )
108108 if err != nil {
109109 return userName , userEmail , fmt .Errorf ("Failed to set the git email to %s: %w" , userEmail , err )
110110 }
0 commit comments