Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlugInstall is trying to clone into a path composed of cygwin + windows paths concatenated together? #713

Closed
mgregory22 opened this issue Dec 5, 2017 · 12 comments

Comments

@mgregory22
Copy link

mgregory22 commented Dec 5, 2017

I'm having a bizarre problem with some part of vim-plug concatenating paths together, and it's preventing the plugins from installing:

Updated. Elapsed time: 0.502485 sec.
[xxxxxxxxxxxx]

- Finishing ... Done!
x tabular:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\tabular'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\tabular': No such file or directory
x matchit:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\matchit'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\matchit': No such file or directory
x vim-eunuch:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\vim-eunuch'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\vim-eunuch': No such file or directory
x vim-fugitive:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\vim-fugitive'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\vim-fugitive': No such file or directory
x vim-unimpaired:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\vim-unimpaired'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\vim-unimpaired': No such file or directory
x vim-misc:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\vim-misc'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\vim-misc': No such file or directory
x slimv:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\slimv'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\slimv': No such file or directory
x buffet.vim:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\buffet.vim'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\buffet.vim': No such file or directory
x nerdtree:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\nerdtree'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\nerdtree': No such file or directory
x highlight.vim:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\highlight.vim'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\highlight.vim': No such file or directory
x vim-session:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\vim-session'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\vim-session': No such file or directory
x vim-javascript:
    Cloning into 'C:\cygwin\home\Matt\vimfiles\plugged\vim-javascript'...
    fatal: Invalid path '/home/Matt/dotfiles/vimfiles/plugged/C:\cygwin\home\Matt\vimfiles\plugged\vim-javascript': No such file or directory

Any ideas where this extra "/home/Matt/dotfiles/vimfiles/plugged/" string is coming from?

Well, the git is cygwin git, so I guess vim-plug is presuming I'm using Windows git?

@janlazo
Copy link
Collaborator

janlazo commented Dec 7, 2017

Yes.
msys2 git can handle Windows-style and Unix-style paths.
Cygwin git always assumes Unix-style paths.
Question is which Vim are you using? Native windows (from the website or win32 releases), msys2 Vim, or cygwin Vim?

@mgregory22
Copy link
Author

I use Windows x64 Gvim and Cygwin shell and utilities. I'm not particularly attached to cygwin other than it took awhile to get it working the way I want and I've been using it a long time. I suppose I should switch to the linux subsystem, but I haven't really had time to figure it out.

@mgregory22
Copy link
Author

It's cool, I can use msys2 git just for vim-plug. I have it on my system, but I disabled it by removing it from my path. I can just add it to the path before running PlugUpdate or whatever.

@janlazo
Copy link
Collaborator

janlazo commented Dec 11, 2017

Did it work?

@mgregory22
Copy link
Author

Yeah, it worked. So, I guess the issue is that vim-plug is incompatible with Cygwin git. I was going to try and fix it, but I don't think it's currently possible to determine if git is the cygwin git. If you could determine that, then you could run cygpath on the paths to convert them to cygwin paths before passing them to git. At least I think that would fix it.

@janlazo
Copy link
Collaborator

janlazo commented Dec 11, 2017

What's the output of git --version for Cygwin git and Msys2 git on your system?

@mgregory22
Copy link
Author

Cygwin git:

git version 2.15.0

Msys2 git:

git version 2.9.2.windows.1

@janlazo
Copy link
Collaborator

janlazo commented Dec 11, 2017

Cygwin git doesn't have windows in the version string so you can use cygpath on it.
Problem then is which cygpath to use.

@mgregory22
Copy link
Author

mgregory22 commented Dec 11, 2017

Oh, you think the process of elimination would be enough?

Which cygpath? I'm not sure what you mean.

@janlazo
Copy link
Collaborator

janlazo commented Dec 11, 2017

You can't mix up the cygpath and git on each msys2/cygwin installation.
You can use where.exe on cmd.exe to check which one comes up first in PATH.

@mgregory22
Copy link
Author

Well there is no cygpath for msys2, is there?

@janlazo
Copy link
Collaborator

janlazo commented Dec 11, 2017

There is one each on my system from https://git-for-windows.github.io/, mingw, and cygwin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants