Language Servers: Fix go detection

maybe_run only checks the first arugment, which for go modules
would have been `env`. Since `env` exists, it would always attempt
to do the `go install` command, regardless of whether or not go
exists.

This patch moves the env to an exported variable rather than
being passed inline.
This commit is contained in:
ViViDboarder 2023-12-13 09:24:26 -08:00
parent 702af2fa15
commit 60819a7dff

View File

@ -102,7 +102,8 @@ function install_language_servers() {
# Go # Go
if want_lang go ;then if want_lang go ;then
maybe_run env GO111MODULE=on go install golang.org/x/tools/gopls@latest export GO111MODULE=on
maybe_run go install golang.org/x/tools/gopls@latest
fi fi
echo "" echo ""