Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activation prompt with invalid path on Windows Git Bash #5950

Closed
BenediktMaag opened this issue Aug 9, 2024 · 4 comments · Fixed by #5956
Closed

Activation prompt with invalid path on Windows Git Bash #5950

BenediktMaag opened this issue Aug 9, 2024 · 4 comments · Fixed by #5956
Labels
bug Something isn't working

Comments

@BenediktMaag
Copy link

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)

@zanieb zanieb added the bug Something isn't working label Aug 9, 2024
@zanieb
Copy link
Member

zanieb commented Aug 9, 2024

Thanks for the report!

@charliermarsh
Copy link
Member

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

@zanieb
Copy link
Member

zanieb commented Aug 9, 2024

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

@zanieb
Copy link
Member

zanieb commented Aug 9, 2024

As in #5956

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants