Workaround for PlugUpgrade error on Neovim (#111)
This commit is contained in:
parent
396a534a0a
commit
4b3fbd1592
16
plug.vim
16
plug.vim
|
@ -1268,12 +1268,7 @@ function! s:upgrade()
|
|||
throw get(s:lines(output), -1, v:shell_error)
|
||||
endif
|
||||
elseif has('ruby')
|
||||
ruby << EOF
|
||||
require 'open-uri'
|
||||
File.open(VIM::evaluate('new'), 'w') do |f|
|
||||
f << open(VIM::evaluate('s:plug_src')).read
|
||||
end
|
||||
EOF
|
||||
call s:upgrade_using_ruby(new)
|
||||
else
|
||||
return s:err('curl executable or ruby support not found')
|
||||
endif
|
||||
|
@ -1294,6 +1289,15 @@ EOF
|
|||
endif
|
||||
endfunction
|
||||
|
||||
function! s:upgrade_using_ruby(new)
|
||||
ruby << EOF
|
||||
require 'open-uri'
|
||||
File.open(VIM::evaluate('a:new'), 'w') do |f|
|
||||
f << open(VIM::evaluate('s:plug_src')).read
|
||||
end
|
||||
EOF
|
||||
endfunction
|
||||
|
||||
function! s:upgrade_specs()
|
||||
for spec in values(g:plugs)
|
||||
let spec.frozen = get(spec, 'frozen', 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user