Skip to content

GitLens terminal commands can run in the wrong environment when used over WSL (but not with the WSL extension) #2444

Open
@wshamroukh

Description

@wshamroukh

Description

I have installed gitLens vscode extension here on a Windows 10 machine with WSL enabled:

  1. I try to revert a commit and confirm the revert in vscode
  2. GitLens terminal shows up and the following error is generated
    waddahs@WADDAHWS:/mnt/g/Xiaomi/device_xiaomi_cas$ git -C "g:/Xiaomi/device_xiaomi_cas" -c "core.editor=code --wait --reuse-window" revert --no-edit 3f297aa878dcb7b5a7af70b58116827798909b44 fatal: cannot change to 'g:/Xiaomi/device_xiaomi_cas': No such file or directory

the issue is because the terminal is linux shell and the path to my repo is /mnt/g/Xiaomi/device_xiaomi_cas while the git command issued is trying Windows style folder path g:/Xiaomi/device_xiaomi_cas

Is there any configuration in gitLens to fix this behavior?

GitLens Version

13.2.0

VS Code Version

Version: 1.74.3 (system setup)
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:59:02.252Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No

Git Version

git version 2.25.1

Logs, Screenshots, Screen Captures, etc

waddahs@WADDAHWS:/mnt/g/Xiaomi/device_xiaomi_cas$ git -C "g:/Xiaomi/device_xiaomi_cas" -c "core.editor=code --wait --reuse-window" revert --no-edit 3f297aa878dcb7b5a7af70b58116827798909b44 fatal: cannot change to 'g:/Xiaomi/device_xiaomi_cas': No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions