Skip to content

Commit

Permalink
feat: make 'go list' use cmd_prefix, if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Jan 12, 2025
1 parent 681914e commit 87578c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/neotest-golang/lib/cmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ local M = {}
--- Call 'go list -json {go_list_args...} ./...' to get test file data
--- @param cwd string
function M.golist_data(cwd)
local cmd = M.golist_command()
local cmd = options.get().cmd_prefix or {}
cmd = vim.list_extend(vim.deepcopy(cmd), M.golist_command())
local go_list_command_concat = table.concat(cmd, " ")
logger.info("Running Go list: " .. go_list_command_concat .. " in " .. cwd)
local result = vim.system(cmd, { cwd = cwd, text = true }):wait()
Expand Down

0 comments on commit 87578c1

Please sign in to comment.