From 4e806ce520dc035197118258a8d73bb7651184ad Mon Sep 17 00:00:00 2001 From: Lukasz Zajaczkowski Date: Mon, 7 Nov 2022 10:16:01 +0100 Subject: [PATCH] fix overriding ~/.gitconfig (#257) --- pkg/server/configuration_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/server/configuration_test.go b/pkg/server/configuration_test.go index d266a17a..c98e05b5 100644 --- a/pkg/server/configuration_test.go +++ b/pkg/server/configuration_test.go @@ -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", "test@plural.com")