From 6c2a3c97454e7cc1c0e9e30dda73a055b995bc6c Mon Sep 17 00:00:00 2001 From: Shivram <86292088+shivrm@users.noreply.github.com> Date: Wed, 22 Nov 2023 23:11:18 +0530 Subject: [PATCH] Fix env var bug in history.silentGitsh (#210) --- history/history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/history/history.go b/history/history.go index a2a3286..571477c 100644 --- a/history/history.go +++ b/history/history.go @@ -69,7 +69,7 @@ func gitsh(args ...string) (out bytes.Buffer, err error) { func silentGitsh(args ...string) (out bytes.Buffer, err error) { cmd := exec.Command(gitpath, args...) cmd.Dir = files.HyphaeDir() - cmd.Env = gitEnv + cmd.Env = append(cmd.Environ(), gitEnv...) b, err := cmd.CombinedOutput() return *bytes.NewBuffer(b), err