PlugUpdate fails on Windows with powershell
- Dominant language
- Vim Script
- Stars
- 35.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.