Closed jamestansx closed 3 years ago
It works, pdm venv activate <env_name>
only outputs the command and you need to execute yourself. On PowerShell you can do:
PS> . (pdm venv activate)
The .ps1
extension name is optional. Note the first character is a dot.
Tested, it works. Thanks.
But actually won't it be better if running pdm venv activate <env_name>
auto activate the env, without users create alias?
The activate command changes the current shell process(the instruction tells you to prefix with source
), while pdm ...
spawns a new process and any modifications based upon that can't impact the current process. Pipenv and Poetry's shell
command spawns a new process, but with a lot of bugs and inconsistencies.
PDM just doesn't want to bother with that. It only adds a little effort to the user side but keeps the user experience of the fancy shell.
Describe the bug A clear and concise description of what the bug is.
pdm venv activate
doesn't work in powershell. Calling the command doesn't activate the venv env. To Reproduce Steps to reproduce the behavior:Expected behavior A clear and concise description of what you expected to happen. Calling
pdm venv activate
should auto detect the shell used and activate the appropriate script as by manually runactivate.ps1
works.Screenshots If applicable, add screenshots to help explain your problem.
System (please complete the following information):
pdm-venv
version: 0.2.0Additional context Add any other context about the problem here. pdm-venv is installed via
pdm plugin add pdm-venv