-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
On windows poetry shell always start a cmd #2030
Comments
tl;dr: This is a bug in the get-poetry.py install script, it creates poetry.bat on Windows, so the closest shell is always cmd.exe. Workaround is to install Poetry using Fix would be for get-poetry.py to create an executable instead of a batch file, e.g., what pip does using (I think this is a general bug in Poetry, I just noticed that "scripts" created in my project are also shell scripts, not binaries, as they would be if installed using setuptools and setup.py)
I tried setting So if I in-line the batch file, and set
Of course, that's not a workaround, but suggests that if Poetry honoured Edit: Oh, in fact, So the So this is a problem with the way Poetry is installed. I've had similar issues, because calling I'm not sure if poetry.bat is under Poetry's control, or if it happens with a pip/pipx install, this install was done via the recommended Edit: Yeah, it's the get-poetry.py script that creates the .bat file. Running the included Python script, i.e.
correctly launches pwsh.exe So the fix for this would be for the get-poetry.py installer to create an executable (like pip does using In the meantime, I might switch to Edit: I'm not even sure how the |
this command work for me 💯 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
On Windows it looks like
poetry shell
always spawn a cmd even when run from a Powershell window. As expected the$SHELL
environment variable is not working. This could be worked around by usingpoetry run "C:\Program Files\PowerShell\7-preview\pwsh.exe"
The text was updated successfully, but these errors were encountered: