summaryrefslogtreecommitdiffstats
path: root/pre_commit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-02-21 06:15:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-02-21 06:15:11 +0000
commit5d4f227ea14ecd5d25d5910d13125ab3ddde05e9 (patch)
treede847f47ec2669e74b9a3459319579346b7c99df /pre_commit
parentAdding upstream version 3.6.1. (diff)
downloadpre-commit-5d4f227ea14ecd5d25d5910d13125ab3ddde05e9.tar.xz
pre-commit-5d4f227ea14ecd5d25d5910d13125ab3ddde05e9.zip
Adding upstream version 3.6.2.upstream/3.6.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit')
-rw-r--r--pre_commit/languages/golang.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pre_commit/languages/golang.py b/pre_commit/languages/golang.py
index 4c13d8f..66e07cf 100644
--- a/pre_commit/languages/golang.py
+++ b/pre_commit/languages/golang.py
@@ -23,6 +23,7 @@ from pre_commit import lang_base
from pre_commit.envcontext import envcontext
from pre_commit.envcontext import PatchesT
from pre_commit.envcontext import Var
+from pre_commit.git import no_git_env
from pre_commit.prefix import Prefix
from pre_commit.util import cmd_output
from pre_commit.util import rmtree
@@ -141,7 +142,7 @@ def install_environment(
else:
gopath = env_dir
- env = dict(os.environ, GOPATH=gopath)
+ env = no_git_env(dict(os.environ, GOPATH=gopath))
env.pop('GOBIN', None)
if version != 'system':
env['GOROOT'] = os.path.join(env_dir, '.go')