fix(checkhealth): shell_error and cpanm module

shell_error is a function, the code missed parentheses

The actual module for perl module version is App::cpanminus::script, not
App::cpanminus::fatscript.
This commit is contained in:
JingMatrix 2023-04-16 12:39:48 +02:00 committed by GitHub
parent fd68cd1c0a
commit 7f94a032e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -850,7 +850,7 @@ local function perl()
local latest_cpan_cmd = {
perl_exec,
'-MApp::cpanminus::fatscript',
'-MApp::cpanminus::script',
'-e',
'my $app = App::cpanminus::script->new; $app->parse_options ("--info", "-q", "Neovim::Ext"); exit $app->doit',
}
@ -886,7 +886,7 @@ local function perl()
local current_cpan_cmd = { perl_exec, '-W', '-MNeovim::Ext', '-e', 'print $Neovim::Ext::VERSION' }
local current_cpan = system(current_cpan_cmd)
if shell_error then
if shell_error() then
error(
'Failed to run: ' .. table.concat(current_cpan_cmd, ' '),
{ 'Report this issue with the output of: ', table.concat(current_cpan_cmd, ' ') }