-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Issue Type: Bug
Setting git.path to use git from a msys2 instalation ("C:/msys64/usr/bin/git.exe") causes extension to fail with the error:
Error: spawn C:/msys64/usr/bin/git.exe ENOENT
I have tracked the root cause for this to be that msys2 git prints paths in Unix format rather than Windows format unlike Git for Windows.
git rev-parse --show-toplevel prints /c/Code/AeonGUI on msys2 git,
but prints C:/Code/AeonGUI on Git for Windows.
This happens regardless of if the command is issued from inside bash or cmd.exe.
I looked for external solutions, an env var that could be set or a git config setting but found nothing other than calling cygpath -w "$(git rev-parse --show-toplevel)", which is not usable as a git.path or any other setting.
Steps to reproduce:
- Install MSYS2 from https://www.msys2.org
- Run MSYS2 bash for MinGW64
- Install git:
pacman -S git - Run vscode
- Set "git.path": "C:/msys64/usr/bin/git.exe" on settings.js
- Close and rerun vscode and open a file in a git repository
- The extension will likely fail at this point, but clicking the extension icon on the left pane will trigger more failures
Extension version: 10.2.1
VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:45:59.656Z)
OS version: Windows_NT x64 10.0.18363