Skip to content

Python Environment creation fails with uv when using Git Bash as default shell due to Windows path format #550

Open
@iwangbowen

Description

@iwangbowen

Issue Title:
Python Environment creation fails with uv when using Git Bash as default shell due to Windows path format

Issue Description:
I'm using Git Bash as my default shell in VS Code. When creating a virtual environment for a project that uses uv as the dependency management tool, the plugin executes the following command:

uv pip install --python C:\Users\iwang\workspace\ragflow\.venv\Scripts\python.exe -r c:\Users\iwang\workspace\ragflow\intergrations\chatgpt-on-wechat\plugins\requirements.txt

Image

This command fails in Git Bash due to the Windows-style path format with backslashes, but it works correctly when executed in PowerShell.

Expected Behavior:
The plugin should adapt the path format based on the current shell environment, using forward slashes for Git Bash or properly escaped paths.

Actual Behavior:
The command fails in Git Bash because Windows-style paths with backslashes are not properly handled.

Environment:

  • VS Code Insiders with Git Bash as default shell
  • Project using uv for dependency management
  • Windows OS

Possible Solution:
Convert Windows paths to Unix-style paths when Git Bash is detected as the active shell, or properly escape the paths for bash compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions