What version of Go are you using (go version)?
$ go version
go version go1.21.1 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/lotus/.cache/go-build'
GOENV='/home/lotus/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/lotus/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/lotus/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/nix/store/pvvv2lmx9m8b2n0447mljrl5xmla8r3h-go-1.21.1/share/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/nix/store/pvvv2lmx9m8b2n0447mljrl5xmla8r3h-go-1.21.1/share/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1926203900=/tmp/go-build -gno-record-gcc-switches'
What did you do?
My terminal has EDITOR=nvim set. go mod download gets stuck once it calls git tag and git opens NeoVim in the background.
The solution was to do EDITOR= go mod download. Maybe the EDITOR variable should be cleared when calling git.
What did you expect to see?
The command should complete
What did you see instead?
Nothing, the program is stuck. Inspecting the process tree, I see this:

What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
My terminal has
EDITOR=nvimset.go mod downloadgets stuck once it callsgit tagand git opens NeoVim in the background.The solution was to do
EDITOR= go mod download. Maybe theEDITORvariable should be cleared when callinggit.What did you expect to see?
The command should complete
What did you see instead?
Nothing, the program is stuck. Inspecting the process tree, I see this: