diff options
| author | Nikhil Jha <nikhiljha@users.noreply.github.com> | 2022-09-28 11:52:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-28 20:52:38 +0200 |
| commit | b39da844d26f598eca05c6decac0bd48713cd7ea (patch) | |
| tree | 3335e7863ca1ff853ae5cc3349140d2737931eb2 /lua/mason-core/platform.lua | |
| parent | feat(stylua): add arm64 Linux support (#477) (diff) | |
| download | mason-b39da844d26f598eca05c6decac0bd48713cd7ea.tar mason-b39da844d26f598eca05c6decac0bd48713cd7ea.tar.gz mason-b39da844d26f598eca05c6decac0bd48713cd7ea.tar.bz2 mason-b39da844d26f598eca05c6decac0bd48713cd7ea.tar.lz mason-b39da844d26f598eca05c6decac0bd48713cd7ea.tar.xz mason-b39da844d26f598eca05c6decac0bd48713cd7ea.tar.zst mason-b39da844d26f598eca05c6decac0bd48713cd7ea.zip | |
feat(verible): add support for CentOS 7.9 (#471)
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, |
