-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
area/venvRelated to virtualenv managementRelated to virtualenv managementkind/bugSomething isn't working as expectedSomething isn't working as expected
Description
If I run the CLI command poetry add <package-name> whilst in a virtual environment to which the path contains a space I get the following error:
[VenvCommandError]
Command C:\Users\Oisin Smith\PycharmProjects\WxEpos\venv\Scripts\python.exe -c "import sys; print('.'.join([str(s) for s in sys.version_info[:3]]))" errored with the following output:
'C:\Users\Firstname' is not recognized as an internal or external command operable program or batch file
The problem seems to be that the venv is somewhere inside the C:\Users\Firstname Lastname directory that contains a space. This seems to be the Line causing the error https://github.com/sdispater/poetry/blob/master/poetry/utils/venv.py#L175
One possible fix would be to change this line to add quotes around the bin (ie. bin = f"'{bin}'") string.` I'm not sure where it would be most appropriate to change, so if you let me know, I could create a PR.
Thank you for your great work on this package!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/venvRelated to virtualenv managementRelated to virtualenv managementkind/bugSomething isn't working as expectedSomething isn't working as expected