mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor: move provider-related to where they are used
This commit is contained in:
parent
1c73bd7d27
commit
520c2657bb
@ -275,114 +275,6 @@ function M.error(msg, ...)
|
|||||||
collect_output(input)
|
collect_output(input)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M._provider_disabled(provider)
|
|
||||||
local loaded_var = 'loaded_' .. provider .. '_provider'
|
|
||||||
local v = vim.g[loaded_var]
|
|
||||||
if v == 0 then
|
|
||||||
M.info('Disabled (' .. loaded_var .. '=' .. v .. ').')
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Handler for s:system() function.
|
|
||||||
local function system_handler(self, _, data, event)
|
|
||||||
if event == 'stderr' then
|
|
||||||
if self.add_stderr_to_output then
|
|
||||||
self.output = self.output .. table.concat(data, '')
|
|
||||||
else
|
|
||||||
self.stderr = self.stderr .. table.concat(data, '')
|
|
||||||
end
|
|
||||||
elseif event == 'stdout' then
|
|
||||||
self.output = self.output .. table.concat(data, '')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Attempts to construct a shell command from an args list.
|
|
||||||
-- Only for display, to help users debug a failed command.
|
|
||||||
local function shellify(cmd)
|
|
||||||
if type(cmd) ~= 'table' then
|
|
||||||
return cmd
|
|
||||||
end
|
|
||||||
local escaped = {}
|
|
||||||
for i, v in ipairs(cmd) do
|
|
||||||
if v:match('[^A-Za-z_/.-]') then
|
|
||||||
escaped[i] = vim.fn.shellescape(v)
|
|
||||||
else
|
|
||||||
escaped[i] = v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return table.concat(escaped, ' ')
|
|
||||||
end
|
|
||||||
|
|
||||||
function M._cmd_ok(cmd)
|
|
||||||
local out = vim.fn.system(cmd)
|
|
||||||
return vim.v.shell_error == 0, out
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Run a system command and timeout after 30 seconds.
|
|
||||||
---
|
|
||||||
--- @param cmd table List of command arguments to execute
|
|
||||||
--- @param args? table Optional arguments:
|
|
||||||
--- - stdin (string): Data to write to the job's stdin
|
|
||||||
--- - stderr (boolean): Append stderr to stdout
|
|
||||||
--- - ignore_error (boolean): If true, ignore error output
|
|
||||||
--- - timeout (number): Number of seconds to wait before timing out (default 30)
|
|
||||||
function M._system(cmd, args)
|
|
||||||
args = args or {}
|
|
||||||
local stdin = args.stdin or ''
|
|
||||||
local stderr = vim.F.if_nil(args.stderr, false)
|
|
||||||
local ignore_error = vim.F.if_nil(args.ignore_error, false)
|
|
||||||
|
|
||||||
local shell_error_code = 0
|
|
||||||
local opts = {
|
|
||||||
add_stderr_to_output = stderr,
|
|
||||||
output = '',
|
|
||||||
stderr = '',
|
|
||||||
on_stdout = system_handler,
|
|
||||||
on_stderr = system_handler,
|
|
||||||
on_exit = function(_, data)
|
|
||||||
shell_error_code = data
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
local jobid = vim.fn.jobstart(cmd, opts)
|
|
||||||
|
|
||||||
if jobid < 1 then
|
|
||||||
local message =
|
|
||||||
string.format('Command error (job=%d): %s (in %s)', jobid, shellify(cmd), vim.uv.cwd())
|
|
||||||
error(message)
|
|
||||||
return opts.output, 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if stdin:find('^%s$') then
|
|
||||||
vim.fn.chansend(jobid, stdin)
|
|
||||||
end
|
|
||||||
|
|
||||||
local res = vim.fn.jobwait({ jobid }, vim.F.if_nil(args.timeout, 30) * 1000)
|
|
||||||
if res[1] == -1 then
|
|
||||||
error('Command timed out: ' .. shellify(cmd))
|
|
||||||
vim.fn.jobstop(jobid)
|
|
||||||
elseif shell_error_code ~= 0 and not ignore_error then
|
|
||||||
local emsg = string.format(
|
|
||||||
'Command error (job=%d, exit code %d): %s (in %s)',
|
|
||||||
jobid,
|
|
||||||
shell_error_code,
|
|
||||||
shellify(cmd),
|
|
||||||
vim.uv.cwd()
|
|
||||||
)
|
|
||||||
if opts.output:find('%S') then
|
|
||||||
emsg = string.format('%s\noutput: %s', emsg, opts.output)
|
|
||||||
end
|
|
||||||
if opts.stderr:find('%S') then
|
|
||||||
emsg = string.format('%s\nstderr: %s', emsg, opts.stderr)
|
|
||||||
end
|
|
||||||
error(emsg)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- return opts.output
|
|
||||||
return vim.trim(vim.fn.system(cmd)), shell_error_code
|
|
||||||
end
|
|
||||||
|
|
||||||
local path2name = function(path)
|
local path2name = function(path)
|
||||||
if path:match('%.lua$') then
|
if path:match('%.lua$') then
|
||||||
-- Lua: transform "../lua/vim/lsp/health.lua" into "vim.lsp"
|
-- Lua: transform "../lua/vim/lsp/health.lua" into "vim.lsp"
|
||||||
|
@ -3,6 +3,112 @@ local iswin = vim.uv.os_uname().sysname == 'Windows_NT'
|
|||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
local function cmd_ok(cmd)
|
||||||
|
local out = vim.fn.system(cmd)
|
||||||
|
return vim.v.shell_error == 0, out
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Attempts to construct a shell command from an args list.
|
||||||
|
-- Only for display, to help users debug a failed command.
|
||||||
|
local function shellify(cmd)
|
||||||
|
if type(cmd) ~= 'table' then
|
||||||
|
return cmd
|
||||||
|
end
|
||||||
|
local escaped = {}
|
||||||
|
for i, v in ipairs(cmd) do
|
||||||
|
if v:match('[^A-Za-z_/.-]') then
|
||||||
|
escaped[i] = vim.fn.shellescape(v)
|
||||||
|
else
|
||||||
|
escaped[i] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return table.concat(escaped, ' ')
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Handler for s:system() function.
|
||||||
|
local function system_handler(self, _, data, event)
|
||||||
|
if event == 'stderr' then
|
||||||
|
if self.add_stderr_to_output then
|
||||||
|
self.output = self.output .. table.concat(data, '')
|
||||||
|
else
|
||||||
|
self.stderr = self.stderr .. table.concat(data, '')
|
||||||
|
end
|
||||||
|
elseif event == 'stdout' then
|
||||||
|
self.output = self.output .. table.concat(data, '')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param cmd table List of command arguments to execute
|
||||||
|
--- @param args? table Optional arguments:
|
||||||
|
--- - stdin (string): Data to write to the job's stdin
|
||||||
|
--- - stderr (boolean): Append stderr to stdout
|
||||||
|
--- - ignore_error (boolean): If true, ignore error output
|
||||||
|
--- - timeout (number): Number of seconds to wait before timing out (default 30)
|
||||||
|
local function system(cmd, args)
|
||||||
|
args = args or {}
|
||||||
|
local stdin = args.stdin or ''
|
||||||
|
local stderr = vim.F.if_nil(args.stderr, false)
|
||||||
|
local ignore_error = vim.F.if_nil(args.ignore_error, false)
|
||||||
|
|
||||||
|
local shell_error_code = 0
|
||||||
|
local opts = {
|
||||||
|
add_stderr_to_output = stderr,
|
||||||
|
output = '',
|
||||||
|
stderr = '',
|
||||||
|
on_stdout = system_handler,
|
||||||
|
on_stderr = system_handler,
|
||||||
|
on_exit = function(_, data)
|
||||||
|
shell_error_code = data
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
local jobid = vim.fn.jobstart(cmd, opts)
|
||||||
|
|
||||||
|
if jobid < 1 then
|
||||||
|
local message =
|
||||||
|
string.format('Command error (job=%d): %s (in %s)', jobid, shellify(cmd), vim.uv.cwd())
|
||||||
|
error(message)
|
||||||
|
return opts.output, 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if stdin:find('^%s$') then
|
||||||
|
vim.fn.chansend(jobid, stdin)
|
||||||
|
end
|
||||||
|
|
||||||
|
local res = vim.fn.jobwait({ jobid }, vim.F.if_nil(args.timeout, 30) * 1000)
|
||||||
|
if res[1] == -1 then
|
||||||
|
error('Command timed out: ' .. shellify(cmd))
|
||||||
|
vim.fn.jobstop(jobid)
|
||||||
|
elseif shell_error_code ~= 0 and not ignore_error then
|
||||||
|
local emsg = string.format(
|
||||||
|
'Command error (job=%d, exit code %d): %s (in %s)',
|
||||||
|
jobid,
|
||||||
|
shell_error_code,
|
||||||
|
shellify(cmd),
|
||||||
|
vim.uv.cwd()
|
||||||
|
)
|
||||||
|
if opts.output:find('%S') then
|
||||||
|
emsg = string.format('%s\noutput: %s', emsg, opts.output)
|
||||||
|
end
|
||||||
|
if opts.stderr:find('%S') then
|
||||||
|
emsg = string.format('%s\nstderr: %s', emsg, opts.stderr)
|
||||||
|
end
|
||||||
|
error(emsg)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- return opts.output
|
||||||
|
return vim.trim(vim.fn.system(cmd)), shell_error_code
|
||||||
|
end
|
||||||
|
|
||||||
|
local function provider_disabled(provider)
|
||||||
|
local loaded_var = 'loaded_' .. provider .. '_provider'
|
||||||
|
local v = vim.g[loaded_var]
|
||||||
|
if v == 0 then
|
||||||
|
health.info('Disabled (' .. loaded_var .. '=' .. v .. ').')
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
local function clipboard()
|
local function clipboard()
|
||||||
health.start('Clipboard (optional)')
|
health.start('Clipboard (optional)')
|
||||||
|
|
||||||
@ -10,7 +116,7 @@ local function clipboard()
|
|||||||
os.getenv('TMUX')
|
os.getenv('TMUX')
|
||||||
and vim.fn.executable('tmux') == 1
|
and vim.fn.executable('tmux') == 1
|
||||||
and vim.fn.executable('pbpaste') == 1
|
and vim.fn.executable('pbpaste') == 1
|
||||||
and not health._cmd_ok('pbpaste')
|
and not cmd_ok('pbpaste')
|
||||||
then
|
then
|
||||||
local tmux_version = string.match(vim.fn.system('tmux -V'), '%d+%.%d+')
|
local tmux_version = string.match(vim.fn.system('tmux -V'), '%d+%.%d+')
|
||||||
local advice = {
|
local advice = {
|
||||||
@ -40,7 +146,7 @@ end
|
|||||||
local function node()
|
local function node()
|
||||||
health.start('Node.js provider (optional)')
|
health.start('Node.js provider (optional)')
|
||||||
|
|
||||||
if health._provider_disabled('node') then
|
if provider_disabled('node') then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -60,7 +166,7 @@ local function node()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- local node_v = vim.fn.split(system({'node', '-v'}), "\n")[1] or ''
|
-- local node_v = vim.fn.split(system({'node', '-v'}), "\n")[1] or ''
|
||||||
local ok, node_v = health._cmd_ok({ 'node', '-v' })
|
local ok, node_v = cmd_ok({ 'node', '-v' })
|
||||||
health.info('Node.js: ' .. node_v)
|
health.info('Node.js: ' .. node_v)
|
||||||
if not ok or vim.version.lt(node_v, '6.0.0') then
|
if not ok or vim.version.lt(node_v, '6.0.0') then
|
||||||
health.warn('Nvim node.js host does not support Node ' .. node_v)
|
health.warn('Nvim node.js host does not support Node ' .. node_v)
|
||||||
@ -97,7 +203,7 @@ local function node()
|
|||||||
iswin and 'cmd /c ' .. manager .. ' info neovim --json' or manager .. ' info neovim --json'
|
iswin and 'cmd /c ' .. manager .. ' info neovim --json' or manager .. ' info neovim --json'
|
||||||
)
|
)
|
||||||
local latest_npm
|
local latest_npm
|
||||||
ok, latest_npm = health._cmd_ok(vim.split(latest_npm_cmd, ' '))
|
ok, latest_npm = cmd_ok(vim.split(latest_npm_cmd, ' '))
|
||||||
if not ok or latest_npm:find('^%s$') then
|
if not ok or latest_npm:find('^%s$') then
|
||||||
health.error(
|
health.error(
|
||||||
'Failed to run: ' .. latest_npm_cmd,
|
'Failed to run: ' .. latest_npm_cmd,
|
||||||
@ -115,7 +221,7 @@ local function node()
|
|||||||
|
|
||||||
local current_npm_cmd = { 'node', host, '--version' }
|
local current_npm_cmd = { 'node', host, '--version' }
|
||||||
local current_npm
|
local current_npm
|
||||||
ok, current_npm = health._cmd_ok(current_npm_cmd)
|
ok, current_npm = cmd_ok(current_npm_cmd)
|
||||||
if not ok then
|
if not ok then
|
||||||
health.error(
|
health.error(
|
||||||
'Failed to run: ' .. table.concat(current_npm_cmd, ' '),
|
'Failed to run: ' .. table.concat(current_npm_cmd, ' '),
|
||||||
@ -143,7 +249,7 @@ end
|
|||||||
local function perl()
|
local function perl()
|
||||||
health.start('Perl provider (optional)')
|
health.start('Perl provider (optional)')
|
||||||
|
|
||||||
if health._provider_disabled('perl') then
|
if provider_disabled('perl') then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -162,7 +268,7 @@ local function perl()
|
|||||||
|
|
||||||
-- we cannot use cpanm that is on the path, as it may not be for the perl
|
-- we cannot use cpanm that is on the path, as it may not be for the perl
|
||||||
-- set with g:perl_host_prog
|
-- set with g:perl_host_prog
|
||||||
local ok = health._cmd_ok({ perl_exec, '-W', '-MApp::cpanminus', '-e', '' })
|
local ok = cmd_ok({ perl_exec, '-W', '-MApp::cpanminus', '-e', '' })
|
||||||
if not ok then
|
if not ok then
|
||||||
return { perl_exec, '"App::cpanminus" module is not installed' }
|
return { perl_exec, '"App::cpanminus" module is not installed' }
|
||||||
end
|
end
|
||||||
@ -174,7 +280,7 @@ local function perl()
|
|||||||
'my $app = App::cpanminus::script->new; $app->parse_options ("--info", "-q", "Neovim::Ext"); exit $app->doit',
|
'my $app = App::cpanminus::script->new; $app->parse_options ("--info", "-q", "Neovim::Ext"); exit $app->doit',
|
||||||
}
|
}
|
||||||
local latest_cpan
|
local latest_cpan
|
||||||
ok, latest_cpan = health._cmd_ok(latest_cpan_cmd)
|
ok, latest_cpan = cmd_ok(latest_cpan_cmd)
|
||||||
if not ok or latest_cpan:find('^%s*$') then
|
if not ok or latest_cpan:find('^%s*$') then
|
||||||
health.error(
|
health.error(
|
||||||
'Failed to run: ' .. table.concat(latest_cpan_cmd, ' '),
|
'Failed to run: ' .. table.concat(latest_cpan_cmd, ' '),
|
||||||
@ -205,7 +311,7 @@ local function perl()
|
|||||||
|
|
||||||
local current_cpan_cmd = { perl_exec, '-W', '-MNeovim::Ext', '-e', 'print $Neovim::Ext::VERSION' }
|
local current_cpan_cmd = { perl_exec, '-W', '-MNeovim::Ext', '-e', 'print $Neovim::Ext::VERSION' }
|
||||||
local current_cpan
|
local current_cpan
|
||||||
ok, current_cpan = health._cmd_ok(current_cpan_cmd)
|
ok, current_cpan = cmd_ok(current_cpan_cmd)
|
||||||
if not ok then
|
if not ok then
|
||||||
health.error(
|
health.error(
|
||||||
'Failed to run: ' .. table.concat(current_cpan_cmd, ' '),
|
'Failed to run: ' .. table.concat(current_cpan_cmd, ' '),
|
||||||
@ -292,7 +398,7 @@ end
|
|||||||
local function download(url)
|
local function download(url)
|
||||||
local has_curl = vim.fn.executable('curl') == 1
|
local has_curl = vim.fn.executable('curl') == 1
|
||||||
if has_curl and vim.fn.system({ 'curl', '-V' }):find('Protocols:.*https') then
|
if has_curl and vim.fn.system({ 'curl', '-V' }):find('Protocols:.*https') then
|
||||||
local out, rc = health._system({ 'curl', '-sL', url }, { stderr = true, ignore_error = true })
|
local out, rc = system({ 'curl', '-sL', url }, { stderr = true, ignore_error = true })
|
||||||
if rc ~= 0 then
|
if rc ~= 0 then
|
||||||
return 'curl error with ' .. url .. ': ' .. rc
|
return 'curl error with ' .. url .. ': ' .. rc
|
||||||
else
|
else
|
||||||
@ -305,7 +411,7 @@ local function download(url)
|
|||||||
from urllib2 import urlopen\n\
|
from urllib2 import urlopen\n\
|
||||||
response = urlopen('" .. url .. "')\n\
|
response = urlopen('" .. url .. "')\n\
|
||||||
print(response.read().decode('utf8'))\n"
|
print(response.read().decode('utf8'))\n"
|
||||||
local out, rc = health._system({ 'python', '-c', script })
|
local out, rc = system({ 'python', '-c', script })
|
||||||
if out == '' and rc ~= 0 then
|
if out == '' and rc ~= 0 then
|
||||||
return 'python urllib.request error: ' .. rc
|
return 'python urllib.request error: ' .. rc
|
||||||
else
|
else
|
||||||
@ -362,7 +468,7 @@ end
|
|||||||
local function version_info(python)
|
local function version_info(python)
|
||||||
local pypi_version = latest_pypi_version()
|
local pypi_version = latest_pypi_version()
|
||||||
|
|
||||||
local python_version, rc = health._system({
|
local python_version, rc = system({
|
||||||
python,
|
python,
|
||||||
'-c',
|
'-c',
|
||||||
'import sys; print(".".join(str(x) for x in sys.version_info[:3]))',
|
'import sys; print(".".join(str(x) for x in sys.version_info[:3]))',
|
||||||
@ -373,7 +479,7 @@ local function version_info(python)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local nvim_path
|
local nvim_path
|
||||||
nvim_path, rc = health._system({
|
nvim_path, rc = system({
|
||||||
python,
|
python,
|
||||||
'-c',
|
'-c',
|
||||||
'import sys; sys.path = [p for p in sys.path if p != ""]; import neovim; print(neovim.__file__)',
|
'import sys; sys.path = [p for p in sys.path if p != ""]; import neovim; print(neovim.__file__)',
|
||||||
@ -398,7 +504,7 @@ local function version_info(python)
|
|||||||
|
|
||||||
-- Try to get neovim.VERSION (added in 0.1.11dev).
|
-- Try to get neovim.VERSION (added in 0.1.11dev).
|
||||||
local nvim_version
|
local nvim_version
|
||||||
nvim_version, rc = health._system({
|
nvim_version, rc = system({
|
||||||
python,
|
python,
|
||||||
'-c',
|
'-c',
|
||||||
'from neovim import VERSION as v; print("{}.{}.{}{}".format(v.major, v.minor, v.patch, v.prerelease))',
|
'from neovim import VERSION as v; print("{}.{}.{}{}".format(v.major, v.minor, v.patch, v.prerelease))',
|
||||||
@ -445,7 +551,7 @@ local function python()
|
|||||||
local host_prog_var = pyname .. '_host_prog'
|
local host_prog_var = pyname .. '_host_prog'
|
||||||
local python_multiple = {}
|
local python_multiple = {}
|
||||||
|
|
||||||
if health._provider_disabled(pyname) then
|
if provider_disabled(pyname) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -487,7 +593,7 @@ local function python()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if pyenv ~= '' then
|
if pyenv ~= '' then
|
||||||
python_exe = health._system({ pyenv, 'which', pyname }, { stderr = true })
|
python_exe = system({ pyenv, 'which', pyname }, { stderr = true })
|
||||||
if python_exe == '' then
|
if python_exe == '' then
|
||||||
health.warn('pyenv could not find ' .. pyname .. '.')
|
health.warn('pyenv could not find ' .. pyname .. '.')
|
||||||
end
|
end
|
||||||
@ -710,9 +816,7 @@ local function python()
|
|||||||
health.info(msg)
|
health.info(msg)
|
||||||
health.info(
|
health.info(
|
||||||
'Python version: '
|
'Python version: '
|
||||||
.. health._system(
|
.. system('python -c "import platform, sys; sys.stdout.write(platform.python_version())"')
|
||||||
'python -c "import platform, sys; sys.stdout.write(platform.python_version())"'
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
health.ok('$VIRTUAL_ENV provides :!python.')
|
health.ok('$VIRTUAL_ENV provides :!python.')
|
||||||
end
|
end
|
||||||
@ -721,7 +825,7 @@ end
|
|||||||
local function ruby()
|
local function ruby()
|
||||||
health.start('Ruby provider (optional)')
|
health.start('Ruby provider (optional)')
|
||||||
|
|
||||||
if health._provider_disabled('ruby') then
|
if provider_disabled('ruby') then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -732,7 +836,7 @@ local function ruby()
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
health.info('Ruby: ' .. health._system({ 'ruby', '-v' }))
|
health.info('Ruby: ' .. system({ 'ruby', '-v' }))
|
||||||
|
|
||||||
local host, _ = vim.provider.ruby.detect()
|
local host, _ = vim.provider.ruby.detect()
|
||||||
if (not host) or host:find('^%s*$') then
|
if (not host) or host:find('^%s*$') then
|
||||||
@ -748,7 +852,7 @@ local function ruby()
|
|||||||
health.info('Host: ' .. host)
|
health.info('Host: ' .. host)
|
||||||
|
|
||||||
local latest_gem_cmd = (iswin and 'cmd /c gem list -ra "^^neovim$"' or 'gem list -ra ^neovim$')
|
local latest_gem_cmd = (iswin and 'cmd /c gem list -ra "^^neovim$"' or 'gem list -ra ^neovim$')
|
||||||
local ok, latest_gem = health._cmd_ok(vim.split(latest_gem_cmd, ' '))
|
local ok, latest_gem = cmd_ok(vim.split(latest_gem_cmd, ' '))
|
||||||
if not ok or latest_gem:find('^%s*$') then
|
if not ok or latest_gem:find('^%s*$') then
|
||||||
health.error(
|
health.error(
|
||||||
'Failed to run: ' .. latest_gem_cmd,
|
'Failed to run: ' .. latest_gem_cmd,
|
||||||
@ -761,7 +865,7 @@ local function ruby()
|
|||||||
|
|
||||||
local current_gem_cmd = { host, '--version' }
|
local current_gem_cmd = { host, '--version' }
|
||||||
local current_gem
|
local current_gem
|
||||||
ok, current_gem = health._cmd_ok(current_gem_cmd)
|
ok, current_gem = cmd_ok(current_gem_cmd)
|
||||||
if not ok then
|
if not ok then
|
||||||
health.error(
|
health.error(
|
||||||
'Failed to run: ' .. table.concat(current_gem_cmd, ' '),
|
'Failed to run: ' .. table.concat(current_gem_cmd, ' '),
|
||||||
|
Loading…
Reference in New Issue
Block a user