Skip to content

Commit

Permalink
fix: temporary fix for 'go list -json -f ...' on windows (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil authored Jan 21, 2025
1 parent fd64fea commit 473f54b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/neotest-golang/lib/cmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ function M.golist_command()
}]],
}

-- FIXME: this is a workaround for Windows, where there is a bug with the output
-- when using the -f flag: https://github.com/fredrikaverpil/neotest-golang/issues/276
if vim.fn.has("win32") == 1 then
cmd = { "go", "list", "-json" }
end

local go_list_args = options.get().go_list_args
if type(go_list_args) == "function" then
go_list_args = go_list_args()
Expand Down

0 comments on commit 473f54b

Please sign in to comment.