Skip to content

Activation prompt with invalid path on Windows Git Bash #5950

Description

@BenediktMaag

Windows 11, uv 0.2.34 (c681c5a 2024-08-07)

Activating a environment after creating it:

$ uv v
Using Python 3.12.0 interpreter at: C:\Users\MaagB\AppData\Local\Programs\Python\Python312\python.exe
Creating virtualenv at: .venv
Activate with: source .venv\Scripts\activate

$ source .venv\Scripts\activate
bash: .venvScriptsactivate: No such file or directory

Problem:
git bash on windows seems to resolve the escape sequences before making the source call. To properly activate the environment we either need to properly espace the backslash by another backslash:

$ source .venv\Scripts\activate
(tmpinstall)

Or use the Unix Path:
$ source .venv/Scripts/activate
(tmpinstall)

Activity

  1. zanieb commented on Aug 9, 2024

    @zanieb
    Member

    Thanks for the report!

  2. charliermarsh commented on Aug 9, 2024

    @charliermarsh
    Member

    Do we need to treat Windows Git Bash as its own shell?

  3. zanieb commented on Aug 9, 2024

    @zanieb
    Member

    I think it should be sufficient to always use the portable path

  4. zanieb commented on Aug 9, 2024

    @zanieb
    Member

    As in #5956

    It might make sense to special-case Windows Git Bash still, we see oddities with it.

  5. added 2 commits that reference this issue on Aug 9, 2024
    7fdb878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions