From 9266dc26862d8f3556c2ca77602e811472b4c5b8 Mon Sep 17 00:00:00 2001 From: Hendrik Ziegler Date: Mon, 15 Apr 2024 12:45:49 +0200 Subject: fix(gopls): GOMODCACHE is now found in gitbash #3064 Probem: Error due to the command being processed as a single string by git bash's bash.exe. Solution: Pass the command and arguments as a list rather than a string. --- lua/lspconfig/server_configurations/gopls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/gopls.lua b/lua/lspconfig/server_configurations/gopls.lua index f27033b7..d1c96a21 100644 --- a/lua/lspconfig/server_configurations/gopls.lua +++ b/lua/lspconfig/server_configurations/gopls.lua @@ -9,7 +9,7 @@ return { root_dir = function(fname) -- see: https://github.com/neovim/nvim-lspconfig/issues/804 if not mod_cache then - local result = async.run_command 'go env GOMODCACHE' + local result = async.run_command { 'go', 'env', 'GOMODCACHE' } if result and result[1] then mod_cache = vim.trim(result[1]) end -- cgit v1.2.3-70-g09d2