andy-5 / wslgit

Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)
MIT License
1.18k stars 59 forks source link

Getting errors with "Git History" plugin #43

Closed nomaed closed 5 years ago

nomaed commented 5 years ago

I installed wslgit.exe in vscode bin directory (which is in the path) and stuff seem to be working great! However, when opening the Git History plugin (https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory) tree view, I see a lot of errors in the output log:

{
    "stack": "Error: spawn C:/Program Files/Microsoft VS Code/bin/wslgit.exe ENOENT\n\tat _errnoException (util.js:1024:11)\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)\n\tat onErrorNT (internal/child_process.js:372:16)\n\tat _combinedTickCallback (internal/process/next_tick.js:138:11)\n\tat process._tickCallback (internal/process/next_tick.js:180:9)",
    "message": "spawn C:/Program Files/Microsoft VS Code/bin/wslgit.exe ENOENT",
    "code": "ENOENT",
    "errno": "ENOENT",
    "syscall": "spawn C:/Program Files/Microsoft VS Code/bin/wslgit.exe",
    "path": "C:/Program Files/Microsoft VS Code/bin/wslgit.exe",
    "spawnargs": [
        "rev-parse",
        "--show-toplevel"
    ]
}

settings.json is set up correctly:

{
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\bash.exe",
    "terminal.integrated.shellArgs.windows": [
        "-c",
        "zsh"
    ],
    "git.path": "C:\\Program Files\\Microsoft VS Code\\bin\\wslgit.exe"
}
andy-5 commented 5 years ago

I think this might actually be a bug in the Git History plugin. There is an open issue (https://github.com/DonJayamanne/gitHistoryVSCode/issues/283) discussing a very similar error.

I'm closing this issue for now, feel free to re-open it if you find that your problem is specific to wslgit and not a bug in Git History.