This commit is contained in:
@@ -256,7 +256,7 @@ end
|
|||||||
|
|
||||||
local function collect_go_test_files(root)
|
local function collect_go_test_files(root)
|
||||||
if not root or root == "" then
|
if not root or root == "" then
|
||||||
root = vim.loop.cwd()
|
root = vim.uv.cwd()
|
||||||
end
|
end
|
||||||
local files = vim.fn.globpath(root, "**/*_test.go", false, true)
|
local files = vim.fn.globpath(root, "**/*_test.go", false, true)
|
||||||
if type(files) ~= "table" then
|
if type(files) ~= "table" then
|
||||||
@@ -384,7 +384,7 @@ function runner.build_file_command(bufnr)
|
|||||||
end
|
end
|
||||||
local root = find_root(path, { "go.mod", ".git" })
|
local root = find_root(path, { "go.mod", ".git" })
|
||||||
if not root or root == "" then
|
if not root or root == "" then
|
||||||
root = vim.loop.cwd()
|
root = vim.uv.cwd()
|
||||||
end
|
end
|
||||||
local spec = { file = path, cwd = root }
|
local spec = { file = path, cwd = root }
|
||||||
local pkg = build_pkg_arg(spec)
|
local pkg = build_pkg_arg(spec)
|
||||||
@@ -418,7 +418,7 @@ function runner.build_all_command(bufnr)
|
|||||||
root = find_root(path, { "go.mod", ".git" })
|
root = find_root(path, { "go.mod", ".git" })
|
||||||
end
|
end
|
||||||
if not root or root == "" then
|
if not root or root == "" then
|
||||||
root = vim.loop.cwd()
|
root = vim.uv.cwd()
|
||||||
end
|
end
|
||||||
local cmd = { "go", "test", "-json", "-v", "./..." }
|
local cmd = { "go", "test", "-json", "-v", "./..." }
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user