Only install gopls when go exists
This commit is contained in:
parent
730ab418e7
commit
7690e88544
1 changed files with 10 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
if [[ $(whence -p go 2> /dev/null) ]]; then
|
||||||
local GO_BIN="$(go env GOPATH)/bin"
|
local GO_BIN="$(go env GOPATH)/bin"
|
||||||
if [[ ! -d "${GO_BIN}" ]]; then
|
if [[ ! -d "${GO_BIN}" ]]; then
|
||||||
mkdir -p "${GO_BIN}"
|
mkdir -p "${GO_BIN}"
|
||||||
|
@ -8,3 +9,4 @@ if [[ ! -a "${GO_BIN}/gopls" ]]; then
|
||||||
GO111MODULE=on go get golang.org/x/tools/gopls@latest
|
GO111MODULE=on go get golang.org/x/tools/gopls@latest
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue