diff options
| author | William Boman <william@redwill.se> | 2022-05-17 13:49:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-17 13:49:18 +0200 |
| commit | 9fa0bb2822af391db96687ad6ddb66ddb3529c58 (patch) | |
| tree | 82d5838c98e5c0b3f273f23326099383be6b8c0e /lua/nvim-lsp-installer/core/process.lua | |
| parent | run autogen_metadata.lua (diff) | |
| download | mason-9fa0bb2822af391db96687ad6ddb66ddb3529c58.tar mason-9fa0bb2822af391db96687ad6ddb66ddb3529c58.tar.gz mason-9fa0bb2822af391db96687ad6ddb66ddb3529c58.tar.bz2 mason-9fa0bb2822af391db96687ad6ddb66ddb3529c58.tar.lz mason-9fa0bb2822af391db96687ad6ddb66ddb3529c58.tar.xz mason-9fa0bb2822af391db96687ad6ddb66ddb3529c58.tar.zst mason-9fa0bb2822af391db96687ad6ddb66ddb3529c58.zip | |
chore(functional): restructure and extend functional modules (#703)
Diffstat (limited to 'lua/nvim-lsp-installer/core/process.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/core/process.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lua/nvim-lsp-installer/core/process.lua b/lua/nvim-lsp-installer/core/process.lua index 98a7e5a1..9841c11c 100644 --- a/lua/nvim-lsp-installer/core/process.lua +++ b/lua/nvim-lsp-installer/core/process.lua @@ -1,10 +1,8 @@ local log = require "nvim-lsp-installer.log" -local functional = require "nvim-lsp-installer.core.functional" +local _ = require "nvim-lsp-installer.core.functional" local platform = require "nvim-lsp-installer.core.platform" local uv = vim.loop -local list_any = functional.list_any - ---@alias luv_pipe any ---@alias luv_handle any @@ -46,7 +44,7 @@ end ---@param env table<string, string> ---@param excluded_var_names string[]|nil function M.graft_env(env, excluded_var_names) - local excluded_var_names_set = excluded_var_names and functional.set_of(excluded_var_names) or {} + local excluded_var_names_set = excluded_var_names and _.set_of(excluded_var_names) or {} local merged_env = {} for key, val in pairs(initial_environ) do if not excluded_var_names_set[key] and env[key] == nil then @@ -64,7 +62,7 @@ end ---@param env_list string[] local function sanitize_env_list(env_list) local sanitized_list = {} - for _, env in ipairs(env_list) do + for __, env in ipairs(env_list) do local safe_envs = { "GO111MODULE", "GOBIN", @@ -73,7 +71,7 @@ local function sanitize_env_list(env_list) "GEM_HOME", "GEM_PATH", } - local is_safe_env = list_any(function(safe_env) + local is_safe_env = _.any(function(safe_env) return env:find(safe_env .. "=") == 1 end, safe_envs) if is_safe_env then |
