refactor(lua): use vim.system #34707

This commit is contained in:
Yochem van Rosmalen
2025-07-24 05:03:30 +02:00
committed by GitHub
parent 54b8c99e51
commit 35af766de6
9 changed files with 77 additions and 61 deletions

View File

@@ -45,8 +45,8 @@ function M.detect()
prog = ''
else
-- neovim-ruby-host could be an rbenv shim for another Ruby version.
vim.fn.system(p)
prog = vim.v.shell_error ~= 0 and '' or p
local result = vim.system({ p }):wait()
prog = result.code ~= 0 and '' or p
end
end
local err = prog == '' and 'missing ruby or ruby-host' or ''