vim-plug icon indicating copy to clipboard operation
vim-plug copied to clipboard

vim-plug fails when running :PlugInstall citing git version requirement; git for windows 2.47.1.windows.1 is installed

Open leeand00 opened this issue 11 months ago • 6 comments

I get the following error messages related to git when trying to install plugins using vim-plug after running the :PlugInstall from the vim command prompt.

Please note that I am not using an elevated command prompt to run gvim.

Added this to the vim runtime path:

I tried to fix it by adding the following to the vim runtime path as well but it didn't cause it to detect git.

set rtp+=C:\Program\ Files\Git\mingw64\libexec\git-core

Error Message:

"[Plugins]" [Not edited] --No lines in buffer--
Error detected while processing function <SNR>15_install[1]..<SNR>15_update_impl[53]..<SNR>15_prepare:
line   31:
E31: No such mapping
Error detected while processing function <SNR>15_install[1]..<SNR>15_update_impl[53]..<SNR>15_prepare:
line   31:
E31: No such mapping
Error detected while processing function <SNR>15_install[1]..<SNR>15_update_impl[53]..<SNR>15_prepare:
line   31:
E31: No such mapping
Error detected while processing function <SNR>15_install[1]..<SNR>15_update_impl[53]..<SNR>15_prepare:
line   31:
E31: No such mapping
Error detected while processing function <SNR>15_install[1]..<SNR>15_update_impl[53]..<SNR>15_prepare:
line   31:
E31: No such mapping
Error detected while processing function <SNR>15_install[1]..<SNR>15_update_impl[53]..<SNR>15_prepare:
line   31:
E31: No such mapping
Error detected while processing function <SNR>15_install[1]..<SNR>15_update_impl[62]..<SNR>15_git_version_requirement[2]..<SNR>15_system[30]..function <SNR>15_install[1]..<SNR>15_update_impl[62]..<SNR>15_git_version_requirement[2]..<SNR>15_system:
line   24:
E282: Cannot read from "C:\Users\HELPDE~1\AppData\Local\Temp\V3F24F8.tmp"

Git version:

PS C:\Users\helpdeskaleer> git --version
git version 2.47.1.windows.1

Git path:

PS C:\Users\helpdeskaleer> git --exec-path
C:/Program Files/Git/mingw64/libexec/git-core

Plug Block:

call plug#begin()
Plug 'jpalardy/vim-slime'
" Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
" Plug 'junegunn/fzf.vim'
call plug#end()

vim version info

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan  2 2024 23:51:27)
MS-Windows 64-bit GUI version with OLE support
Compiled by appveyor@APPVEYOR-VM
Huge version with GUI.  Features included (+) or not (-):
+acl                +digraphs           +linebreak          +python3/dyn-stable +timers
+arabic             +directx            +lispindent         +quickfix           +title
+autocmd            -dnd                +listcmds           +reltime            +toolbar
+autochdir          -ebcdic             +localmap           +rightleft          +user_commands
+autoservername     +emacs_tags         +lua/dyn            +ruby/dyn           +vartabs
+balloon_eval       +eval               +menu               +scrollbind         +vertsplit
-balloon_eval_term  +ex_extra           +mksession          +signs              +vim9script
+browse             +extra_search       +modify_fname       +smartindent        +viminfo
++builtin_terms     -farsi              +mouse              +sodium/dyn         +virtualedit
+byte_offset        +file_in_path       +mouseshape         +sound              +visual
+channel            +find_in_path       +multi_byte_ime/dyn +spell              +visualextra
+cindent            +float              +multi_lang         +startuptime        +vreplace
+clientserver       +folding            +mzscheme/dyn       +statusline         -vtp
+clipboard          -footer             +netbeans_intg      -sun_workshop       +wildignore
+cmdline_compl      +gettext/dyn        +num64              +syntax             +wildmenu
+cmdline_hist       -hangul_input       +ole                +tag_binary         +windows
+cmdline_info       +iconv/dyn          +packages           -tag_old_static     +writebackup
+comments           +insert_expand      +path_extra         -tag_any_white      -xattr
+conceal            +ipv6               +perl/dyn           -tcl                -xfontset
+cryptv             +job                +persistent_undo    -termguicolors      -xim
+cscope             +jumplist           +popupwin           +terminal           +xpm_w32
+cursorbind         +keymap             -postscript         -termresponse       -xterm_save
+cursorshape        +lambda             +printer            +textobjects        
+dialog_con_gui     +langmap            +profile            +textprop           
+diff               +libcall            +python/dyn         -tgetent            
   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 -DHAVE_STDINT_H  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP   -DFEAT_XPM_W32 -DHAVE_SODIUM -DDYNAMIC_SODIUM -DDYNAMIC_SODIUM_DLL=\"libsodium.dll\" /I "C:\projects\vim-win32-installer\dependencies\libsodium\include" -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 /source-charset:utf-8 /MP /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=\"python3.dll\" -DDYNAMIC_PYTHON3_STABLE_ABI -DFEAT_MZSCHEME -I "C:\projects\vim-win32-installer\dependencies\racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_dcgt6o.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_dcgt6o.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl532.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-ucrt-ruby320.dll\" -DRUBY_VERSION=32 -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:python3.lib    winmm.lib Ws2_32.lib xpm\x64\lib-vc14\libXpm.lib  /PDB:gvim.pdb -debug
  • Type:
    • [ ] Bug
    • [ ] Enhancement
    • [ ] Feature Request
    • [x] Question
  • OS:
    • [ ] All/Other
    • [ ] Linux
    • [ ] macOS
    • [x] Windows
  • Vim:
    • [ ] Terminal Vim
    • [x] GVim
    • [ ] Neovim

leeand00 avatar Jan 02 '25 22:01 leeand00

E282: Cannot read from "C:\Users\HELPDE~1\AppData\Local\Temp\V3F24F8.tmp"

It can be an issue of your temp directory not allowing process execution. Does this command work?

:echo system('git --help')

junegunn avatar Jan 03 '25 07:01 junegunn

The same thing happened on windows when I had git installed, I tried to run the command you gave in vim and got results that I couldn't read from the temporary file.What should I do?

ChSF001 avatar Jan 07 '25 06:01 ChSF001

What is the output of :echo [&shell, &shellcmdflag, &shellredir]?

junegunn avatar Jan 07 '25 07:01 junegunn

['/bin/sh', '-c', '>%s 2>&1'] I get it, it only works in git terminal, I'm sorry I just found out about this system environment shell must unset

ChSF001 avatar Jan 07 '25 08:01 ChSF001

What is the output of :echo [&shell, &shellcmdflag, &shellredir]?

['powershell', '-c', '2>&1 | Out-File -Encoding default']

leeand00 avatar Jan 11 '25 16:01 leeand00

E282: Cannot read from "C:\Users\HELPDE~1\AppData\Local\Temp\V3F24F8.tmp"

It can be an issue of your temp directory not allowing process execution. Does this command work?

:echo system('git --help')

E282: Cannot read from "C:\Users\HELPDE~1\AppData\Local\Temp\V3F24F8.tmp"

It can be an issue of your temp directory not allowing process execution. Does this command work?

:echo system('git --help')
E282: Cannot read from "C:\Users\HELPDES~1\AppData\Local\Temp\V3FED88.tmp"

The undosified path is C:\Users\helpdeskaleer\AppData\Local\Temp

leeand00 avatar Jan 11 '25 16:01 leeand00

['/bin/sh', '-c', '>%s 2>&1'] I get it, it only works in git terminal, I'm sorry I just found out about this system environment shell must unset

The real problem is vim used %COMSPEC% in none git terminal, I have release patched version https://github.com/lsq/vim-mingw64-installer. You can test in git bash or cmd or powershell.

lsq avatar Oct 31 '25 02:10 lsq