diff options
Diffstat (limited to 'lua/mason-core/platform.lua')
| -rw-r--r-- | lua/mason-core/platform.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lua/mason-core/platform.lua b/lua/mason-core/platform.lua index f1a25666..848e7af1 100644 --- a/lua/mason-core/platform.lua +++ b/lua/mason-core/platform.lua @@ -147,9 +147,20 @@ M.os_distribution = _.lazy(function() version_id = version_id, version = { major = major, minor = minor }, } + elseif entries.ID == '"centos"' then + -- Parses the CentOS VERSION_ID into a major version (the only thing available). + local version_id = entries.VERSION_ID:gsub([["]], "") + local major = tonumber(version_id) + + return { + id = "centos", + version_id = version_id, + version = { major = major }, + } else return { id = "linux-generic", + version = {}, } end end @@ -163,7 +174,7 @@ M.os_distribution = _.lazy(function() return parse_linux_dist(result.stdout) end) :recover(function() - return { id = "linux-generic" } + return { id = "linux-generic", version = {} } end) :get_or_throw() end, |
