Skip to content

Commit

Permalink
fix overriding ~/.gitconfig (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz authored Nov 7, 2022
1 parent baaf73e commit 4e806ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/server/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func TestGetConfiguration(t *testing.T) {
err = context.Write(path.Join(dir, "context.yaml"))
assert.NoError(t, err)

// To don't override ~/.gitconfig
os.Setenv("HOME", dir)
defer os.Unsetenv("HOME")
_, err = git.Init()
assert.NoError(t, err)
_, err = git.GitRaw("config", "--global", "user.email", "[email protected]")
Expand Down

0 comments on commit 4e806ce

Please sign in to comment.