When entering in a Poetry Python project, zsh-activate-py-environment tries to activate a new shell without checking if poetry env info --path returns an error. This is the case when the virtual environment has not been created:
This PR first check if poetry env info --path return success, indicating that there exists a virtual environment. If not, zsh-activate-py-environment creates a new virtual environment and then activates it.
When entering in a Poetry Python project,
zsh-activate-py-environment
tries to activate a new shell without checking ifpoetry env info --path
returns an error. This is the case when the virtual environment has not been created:This PR first check if
poetry env info --path
return success, indicating that there exists a virtual environment. If not,zsh-activate-py-environment
creates a new virtual environment and then activates it.