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

fatal: destination path '/home/...' already exists and is not an empty

Open juanpabloaj opened this issue 10 years ago • 8 comments

I use cygwin in windows 10, when I try

:PlugInstall

The install window is open but I get this message

- Finishing ... Done!
x gruvbox:
    fatal: destination path '/home/pablo/.vim/plugged/gruvbox' already exists and is not an empty directory.

In my ~/.vimrc, I have

let g:plug_timeout=1000
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
call plug#end()

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 20 2016 21:21:42)
Parches incluidos: 1-94
Modificado por <[email protected]>
Compilado por <[email protected]>
Versión "enorme" sin interfaz gráfica (GUI).  Aspectos incluidos (+) o no (-):
+acl             +cscope          -footer          +menu            +num64           +startuptime     +virtualedit
+arabic          +cursorbind      +fork()          +mksession       +packages        +statusline      +visual
+autocmd         +cursorshape     +gettext         +modify_fname    +path_extra      -sun_workshop    +visualextra
-balloon_eval    +dialog_con      -hangul_input    +mouse           +perl/dyn        +syntax          +viminfo
-browse          +diff            +iconv           -mouseshape      +persistent_undo +tag_binary      +vreplace
++builtin_terms  +digraphs        +insert_expand   +mouse_dec       +postscript      +tag_old_static  +wildignore
+byte_offset     -dnd             +job             -mouse_gpm       +printer         -tag_any_white   +wildmenu
+channel         -ebcdic          +jumplist        -mouse_jsbterm   +profile         -tcl             +windows
+cindent         +emacs_tags      +keymap          +mouse_netterm   +python/dyn      +termguicolors   +writebackup
-clientserver    +eval            +lambda          +mouse_sgr       +python3/dyn     +terminfo        -X11
+clipboard       +ex_extra        +langmap         -mouse_sysmouse  +quickfix        +termresponse    -xfontset
+cmdline_compl   +extra_search    +libcall         +mouse_urxvt     +reltime         +textobjects     -xim
+cmdline_hist    +farsi           +linebreak       +mouse_xterm     +rightleft       +timers          -xpm
+cmdline_info    +file_in_path    +lispindent      +multi_byte      +ruby/dyn        +title           -xsmp
+comments        +find_in_path    +listcmds        +multi_lang      +scrollbind      -toolbar         -xterm_clipboard
+conceal         +float           +localmap        -mzscheme        +signs           +user_commands   -xterm_save
+cryptv          +folding         +lua/dyn         +netbeans_intg   +smartindent     +vertsplit
     archivo "vimrc" del sistema: "/etc/vimrc"
     archivo "vimrc" del usuario: "$HOME/.vimrc"
  2º archivo "vimrc" del usuario: "~/.vim/vimrc"
      archivo "exrc" del usuario: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
            predefinido para $VIM: "/etc"
     predefinido para $VIMRUNTIME: "/usr/share/vim/vim80"
Compilación: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=
/usr/src/ports/vim/vim-8.0.0094-1.i686/build=/usr/src/debug/vim-8.0.0094-1 -fdebug-prefix-map=/usr/src/ports/vim/vim-8.
0.0094-1.i686/src/vim-8.0.0094=/usr/src/debug/vim-8.0.0094-1 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOUR
CE=1
Enlazado: gcc   -L. -fstack-protector  -fstack-protector-strong -L/usr/local/lib -Wl,--as-needed -o vim.exe        -lm
-lelf    -lncursesw -liconv -lacl -lattr -lintl   -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-i
mage-base -fstack-protector-strong  -L/usr/lib/perl5/5.22/i686-cygwin-threads-64int/CORE -lperl -lpthread -ldl -lcrypt


  • Type:
    • [x] Bug
    • [ ] Enhancement
    • [ ] Feature Request
    • [ ] Question
  • OS:
    • [ ] All/Other
    • [ ] Linux
    • [ ] OS X
    • [x] Windows
  • Vim:
    • [x] Terminal Vim
    • [ ] GVim
    • [ ] Neovim

juanpabloaj avatar Nov 22 '16 20:11 juanpabloaj

I don't know what's going on there, but have you tried :PlugClean?

junegunn avatar Nov 23 '16 06:11 junegunn

:PlugClean
Searching for invalid plugins in /home/pablo/.vim/plugged
[=]

Already clean.

juanpabloaj avatar Nov 23 '16 14:11 juanpabloaj

ok I solved, In windows I have windows git with mingw64

$ git --version
git version 2.10.1.windows.1

and cygwin, when I called git from cygwin, cygwin was used windows git (git installed by mingw64), because windows git are in the PATH, I solved it by installing git in cygwin

$ git --version
git version 2.8.3

my error ... sorry

juanpabloaj avatar Nov 24 '16 14:11 juanpabloaj

No problem. Good to hear that you found the solution. I wonder why windows git doesn't work.

junegunn avatar Nov 25 '16 04:11 junegunn

Maybe windows git work fine with Plug in windows, I tried Plug with windows git in cygwin, in cygwin under windows, cygwin and windows have different path name of directories

  • windows path name of directory : c:/cygwin/home/pablo
  • cygwin path name of directory : /home/pablo

maybe when I was used windows git in cygwin, windows git have problems with the path name of directories.

juanpabloaj avatar Nov 25 '16 12:11 juanpabloaj

@juanpabloaj you saved my day!

Ephasme avatar Feb 20 '18 21:02 Ephasme

@juanpabloaj Thanks for the help.

ttma1046 avatar Aug 19 '19 15:08 ttma1046

"I solved it by installing git in cygwin" - this is hardly a solution as Cygwin git is too slow. In practice many people use Windows git (MinGW or Microsoft ones). At least on Vundle this can be fixed by converting path to mixed style:

  let vimdir = '~/.vim/plugged'
  if has('win32unix')
    " Use mixed path on Cygwin so that Windows git works
    let vimdir = substitute(system('cygpath -m ' . vimdir), '\n\+$', '', '')
  endif
  call vundle#begin(vimdir)

but same trick does not work for plug#begin.

For many people this issue will be a blocker for using vim-plug.

yugr avatar Oct 20 '19 11:10 yugr