vim-plug
vim-plug copied to clipboard
PlugUpdate fails on Windows with powershell
Explain the problem here ...
I use neovim and vim on both Windows 10 and Linux, with many plugins. Recently on Windows I switched from cmd.exe to powershell, and have been tweaking my _vimrc configuration to work correctly with various plugins including vim-plug. In neovim everything is working, but in vim the PlugUpdate and PlugInstall commands are not working. The following errors are shown by the messages command.
Below is the _vimrc fragment where powershell is configured, including fixes introduced to support other plugins.
" Use powershell on Windows if has("win32") " Extension exe required for vim-plug set shell=powershell.exe set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command " set shellquote=( " Required to run shell commands if has("nvim") set shellquote= else set shellquote=" endif set shellxquote= " set shellpipe=| " Required for ack if has("nvim") set shellpipe=|\ Out-File\ -Encoding\ UTF8 else set shellpipe=> endif if has("nvim") set shellredir=|\ Out-File\ -Encoding\ UTF8 else " Required for fzf set shellredir=> endif endif
I have been trying combinations of values for these options, but with no luck. I also tried the recommended configuration introduced in commit https://github.com/junegunn/vim-plug/commit/8a44109329757e29c4956162e3353df367ecdb71, but it did not help.
set shell=powershell shellquote=( shellpipe=\| shellxquote=
set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
set shellredir=\|\ Out-File\ -Encoding\ UTF8
I thought it might be a filename escape problem as described in the 'Windows System Error E484' entry on the FAQ page, but haven't found a solution.
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 25 2020 12:42:23)
MS-Windows 64-bit GUI/console version with OLE support
Included patches: 1-1738
Compiled by tux0r@ROSAELEFANTC33A
Huge version with GUI. Features included (+) or not (-):
+acl +eval +multi_byte_ime/dyn -tag_old_static
+arabic +ex_extra +multi_lang -tag_any_white
+autocmd +extra_search +mzscheme/dyn +tcl/dyn
+autochdir -farsi +netbeans_intg +termguicolors
+autoservername +file_in_path +num64 +terminal
+balloon_eval +find_in_path +ole -termresponse
+balloon_eval_term +float +packages +textobjects
+browse +folding +path_extra +textprop
++builtin_terms -footer +perl/dyn -tgetent
+byte_offset +gettext/dyn +persistent_undo +timers
+channel -hangul_input +popupwin +title
+cindent +iconv/dyn -postscript +toolbar
+clientserver +insert_expand +printer +user_commands
+clipboard +ipv6 +profile +vartabs
+cmdline_compl +job +python/dyn +vertsplit
+cmdline_hist +jumplist +python3/dyn +virtualedit
+cmdline_info +keymap +quickfix +visual
+comments +lambda +reltime +visualextra
+conceal +langmap +rightleft +viminfo
+cryptv +libcall +ruby/dyn +vreplace
+cscope +linebreak +scrollbind +vtp
+cursorbind +lispindent +signs +wildignore
+cursorshape +listcmds +smartindent +wildmenu
+dialog_con_gui +localmap +sound +windows
+diff +lua/dyn +spell +writebackup
+digraphs +menu +startuptime -xfontset
+directx +mksession +statusline -xim
-dnd +modify_fname -sun_workshop +xpm_w32
-ebcdic +mouse +syntax -xterm_save
+emacs_tags +mouseshape +tag_binary
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_TERMINAL
-DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DFEAT_XPM_W32
-DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG
- Type:
- [ ] Bug
- [ ] Enhancement
- [ ] Feature Request
- [ x] Question
- OS:
- [ ] All/Other
- [ ] Linux
- [ ] OS X
- [x ] Windows
- Vim:
- [ ] Terminal Vim
- [ x] GVim
- [ ] Neovim
I am getting exact the same error. With the environment variable COMSPEC
set to C:\Windows\System32\cmd.exe
I can install Plugins just fine, but when I set it to C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
I get this:
Here is my version info, for what it's worth:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 29 2022 22:03:04)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-4647
Compiled by appveyor@APPVYR-WIN
Huge version with GUI. Features included (+) or not (-):
+acl +ex_extra +mzscheme/dyn -tcl
+arabic +extra_search +netbeans_intg -termguicolors
+autocmd -farsi +num64 +terminal
+autochdir +file_in_path +ole -termresponse
+autoservername +find_in_path +packages +textobjects
+balloon_eval +float +path_extra +textprop
-balloon_eval_term +folding +perl/dyn -tgetent
+browse -footer +persistent_undo +timers
++builtin_terms +gettext/dyn +popupwin +title
+byte_offset -hangul_input -postscript +toolbar
+channel +iconv/dyn +printer +user_commands
+cindent +insert_expand +profile +vartabs
+clientserver +ipv6 +python/dyn +vertsplit
+clipboard +job +python3/dyn +vim9script
+cmdline_compl +jumplist +quickfix +viminfo
+cmdline_hist +keymap +reltime +virtualedit
+cmdline_info +lambda +rightleft +visual
+comments +langmap +ruby/dyn +visualextra
+conceal +libcall +scrollbind +vreplace
+cryptv +linebreak +signs -vtp
+cscope +lispindent +smartindent +wildignore
+cursorbind +listcmds +sodium/dyn +wildmenu
+cursorshape +localmap +sound +windows
+dialog_con_gui +lua/dyn +spell +writebackup
+diff +menu +startuptime -xfontset
+digraphs +mksession +statusline -xim
+directx +modify_fname -sun_workshop +xpm_w32
-dnd +mouse +syntax -xterm_save
-ebcdic +mouseshape +tag_binary
+emacs_tags +multi_byte_ime/dyn -tag_old_static
+eval +multi_lang -tag_any_white
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_TERMINAL
-DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DFEAT_XPM_W32
-DHAVE_SODIUM -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"libsodium.dll\" /I "C:\libsodium\include"
-DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG
/Zl /MT /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_OLE -DFEAT_MBYTE_IME
-DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI
-DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\"
-DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3
-DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python310.dll\" -DFEAT_MZSCHEME -I
"C:\racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_da32r
k.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_da32rk.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl532.dll\" -DFEAT_RUBY
-DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby300.dll\" -DRUBY_VERSION=30 -DFEAT_HUGE
/Fd.\ObjGXOULYHRZAMD64/ /Zi
Linking: link /nologo /opt:ref /LTCG /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib
gdi32.lib comdlg32.lib ole32.lib netapi32.lib uuid.lib user32.lib /machine:AMD64 version.lib winspool.lib
comctl32.lib libcmt.lib oleaut32.lib /nodefaultlib:lua54.lib /STACK:8388608 /nodefaultlib:python27.lib
/nodefaultlib:python310.lib winmm.lib WSock32.lib Ws2_32.lib xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb
-debug