From b39da844d26f598eca05c6decac0bd48713cd7ea Mon Sep 17 00:00:00 2001 From: Nikhil Jha Date: Wed, 28 Sep 2022 11:52:38 -0700 Subject: feat(verible): add support for CentOS 7.9 (#471) --- lua/mason-core/platform.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lua/mason-core/platform.lua') 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, -- cgit v1.2.3-70-g09d2