diff options
| author | William Boman <william@redwill.se> | 2024-05-11 21:22:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-11 21:22:49 +0200 |
| commit | 0f1cb65f436b769733d18b41572f617a1fb41f62 (patch) | |
| tree | 05da82b94b6abd153c300418e019d4a3401ab5ef /lua/mason-core/spawn.lua | |
| parent | perf(registry): significantly improve the "file:" protocol performance (#1702) (diff) | |
| download | mason-0f1cb65f436b769733d18b41572f617a1fb41f62.tar mason-0f1cb65f436b769733d18b41572f617a1fb41f62.tar.gz mason-0f1cb65f436b769733d18b41572f617a1fb41f62.tar.bz2 mason-0f1cb65f436b769733d18b41572f617a1fb41f62.tar.lz mason-0f1cb65f436b769733d18b41572f617a1fb41f62.tar.xz mason-0f1cb65f436b769733d18b41572f617a1fb41f62.tar.zst mason-0f1cb65f436b769733d18b41572f617a1fb41f62.zip | |
fix: fix usage of deprecated Neovim APIs (#1703)
Diffstat (limited to 'lua/mason-core/spawn.lua')
| -rw-r--r-- | lua/mason-core/spawn.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/mason-core/spawn.lua b/lua/mason-core/spawn.lua index c6f06d81..33af9ea4 100644 --- a/lua/mason-core/spawn.lua +++ b/lua/mason-core/spawn.lua @@ -5,6 +5,8 @@ local log = require "mason-core.log" local platform = require "mason-core.platform" local process = require "mason-core.process" +local is_not_nil = _.complement(_.equals(vim.NIL)) + ---@alias JobSpawn table<string, async fun(opts: SpawnArgs): Result> ---@type JobSpawn local spawn = { @@ -17,7 +19,7 @@ local spawn = { luarocks = (platform.is.win and vim.fn.executable "luarocks.bat" == 1) and "luarocks.bat" or "luarocks", rebar3 = platform.is.win and "rebar3.cmd" or "rebar3", }, - _flatten_cmd_args = _.compose(_.filter(_.complement(_.equals(vim.NIL))), _.flatten), + _flatten_cmd_args = _.compose(_.filter(is_not_nil), _.flatten), } local function Failure(err, cmd) |
