diff options
| author | treatybreaker <58627896+treatybreaker@users.noreply.github.com> | 2022-03-06 20:53:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-06 21:53:09 +0100 |
| commit | 88aa5277fbfb87e359838660e381b8e65a69e9fa (patch) | |
| tree | 15f6171911a8ed284cad5e9edc9702f8c5ff36ec /lua/nvim-lsp-installer/platform.lua | |
| parent | run server installation in async execution context (#525) (diff) | |
| download | mason-88aa5277fbfb87e359838660e381b8e65a69e9fa.tar mason-88aa5277fbfb87e359838660e381b8e65a69e9fa.tar.gz mason-88aa5277fbfb87e359838660e381b8e65a69e9fa.tar.bz2 mason-88aa5277fbfb87e359838660e381b8e65a69e9fa.tar.lz mason-88aa5277fbfb87e359838660e381b8e65a69e9fa.tar.xz mason-88aa5277fbfb87e359838660e381b8e65a69e9fa.tar.zst mason-88aa5277fbfb87e359838660e381b8e65a69e9fa.zip | |
Support libc detection (#527)
Diffstat (limited to 'lua/nvim-lsp-installer/platform.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/platform.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/platform.lua b/lua/nvim-lsp-installer/platform.lua index 9ab54c6a..62c74046 100644 --- a/lua/nvim-lsp-installer/platform.lua +++ b/lua/nvim-lsp-installer/platform.lua @@ -25,6 +25,16 @@ M.is_unix = vim.fn.has "unix" == 1 M.is_mac = vim.fn.has "mac" == 1 M.is_linux = not M.is_mac and M.is_unix +-- @return string @The libc found on the system, musl or glibc (glibc if ldd is not found) +function M.get_libc() + local _, _, libc_exit_code = os.execute "ldd --version 2>&1 | grep -q musl" + if libc_exit_code == 0 then + return "musl" + else + return "glibc" + end +end + -- PATH separator M.path_sep = M.is_win and ";" or ":" |
