Skip to content

Commit

Permalink
Merge pull request #384 from vim-denops/fix-checktype
Browse files Browse the repository at this point in the history
🐛 prevent error on `denops#plugin#check_type()`
  • Loading branch information
lambdalisue authored Jul 5, 2024
2 parents a626651 + 0d46946 commit 880e30e
Show file tree
Hide file tree
Showing 5 changed files with 598 additions and 5 deletions.
12 changes: 7 additions & 5 deletions autoload/denops/plugin.vim
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ function! denops#plugin#discover() abort
endfunction

function! denops#plugin#check_type(...) abort
let l:plugins = a:0
\ ? [denops#_internal#plugin#get(a:1)]
\ : denops#_internal#plugin#list()
let l:args = [g:denops#deno, 'check']
let l:args = extend(l:args, map(l:plugins, { _, v -> v.script }))
if a:0
let l:scripts = [denops#_internal#plugin#get(a:1).script]
else
let l:scripts = denops#_internal#plugin#list()
\->copy()->map({ _, v -> v.script })->filter({ _, v -> v !=# '' })
endif
let l:args = [g:denops#deno, 'check'] + l:scripts
let l:job = denops#_internal#job#start(l:args, {
\ 'env': {
\ 'NO_COLOR': 1,
Expand Down
Loading

0 comments on commit 880e30e

Please sign in to comment.