From ba4a044ba7969a0a4c2339df1d46ee92fb1ea8ef Mon Sep 17 00:00:00 2001 From: zendesk-acicchetti Date: Wed, 4 May 2022 10:54:10 -0400 Subject: [PATCH] fix gopls --- zsh/funcs/gopls | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/zsh/funcs/gopls b/zsh/funcs/gopls index 18fbb6b..c132363 100644 --- a/zsh/funcs/gopls +++ b/zsh/funcs/gopls @@ -1,12 +1,7 @@ if [[ $(whence -p go 2> /dev/null) ]]; then - local GO_BIN="$(go env GOPATH)/bin" - if [[ ! -d "${GO_BIN}" ]]; then - mkdir -p "${GO_BIN}" - fi - - if [[ ! -a "${GO_BIN}/gopls" ]]; then - pushd "${GO_BIN}" - GO111MODULE=on go get golang.org/x/tools/gopls@latest + if [[ ! $(whence -p gopls 2> /dev/null) ]]; then + pushd /tmp + go install golang.org/x/tools/gopls@latest popd fi -fi \ No newline at end of file +fi