checkhealth: ignore cpamn "!" output #11869

cpanm outputs a warning that suggest to use 'sudo' or use local::lib.
cpanm exits with 0 so nvim thinks that the command worked.

cpanm output that starts with "!"  is likely an error.

Close #11858
This commit is contained in:
Jan Edmund Lazo 2020-02-14 03:43:28 -05:00 committed by GitHub
parent d9657b3ae2
commit 1b200d9936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -708,9 +708,9 @@ function! s:check_perl() abort
endif
call health#report_info('Nvim perl host: '. host)
let latest_cpan_cmd = 'cpanm --info Neovim::Ext'
let latest_cpan_cmd = 'cpanm --info -q Neovim::Ext'
let latest_cpan = s:system(latest_cpan_cmd)
if s:shell_error || empty(latest_cpan)
if s:shell_error || empty(latest_cpan) || latest_cpan[0] ==# '!'
call health#report_error('Failed to run: '. latest_cpan_cmd,
\ ["Make sure you're connected to the internet.",
\ 'Are you behind a firewall or proxy?'])