mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-07 09:34:25 +08:00
Workaround for PlugUpgrade error on Neovim (#111)
This commit is contained in:
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)
|
||||
|
||||
Reference in New Issue
Block a user