Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lua/mason/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ local function check_languages()

a.wait_all {
check_thunk {
cmd = "go",
cmd = platform.is.win and "go.exe" or "go",
args = { "version" },
name = "Go",
relaxed = true,
version_check = function(version)
-- Parses output such as "go version go1.17.3 darwin/arm64" into major, minor, patch components
local _, _, major, minor = version:find "go(%d+)%.(%d+)"
-- Due to https://go.dev/doc/go-get-install-deprecation
if not (tonumber(major) >= 1 and tonumber(minor) >= 17) then
return "Go version must be >= 1.17."
if (not major or not minor) or (not (tonumber(major) >= 1 and tonumber(minor) >= 17)) then
return "Go version must be >= 1.17. ["..version.."]"
end
end,
},
Expand Down