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

poetry exit to safely exit the virtualenv #1057

Closed
dazza-codes opened this issue Apr 26, 2019 · 7 comments
Closed

poetry exit to safely exit the virtualenv #1057

dazza-codes opened this issue Apr 26, 2019 · 7 comments

Comments

@dazza-codes
Copy link
Contributor

Add a poetry exit command to exit a poetry shell; do so safely when the poetry shell is not active already. Since exit will exit a bash shell when a poetry shell is not active, it's "dangerous". At present, there are issues asking for some form of "marker" that a poetry shell is active (i.e. there seems to be no easy way to tell whether or not a poetry shell is active without issuing another poetry shell to get poetry feedback about it). A poetry exit command is an additional feature that provides a safe exit, regardless of whether a poetry shell is active or if the status of it is visible.

@dazza-codes dazza-codes changed the title poetry exit to exit the virtualenv poetry exit to safely exit the virtualenv Apr 26, 2019
@Victor-Savu
Copy link

I'm not sure if it helps, but what I find myself doing is:

source $(poetry env info -p)/bin/activate

using the preview version of poetry. This activates the virtualenv in my current shell which gives me the prompt indicator as well as the option to call deactivate as with any virtual environment.

@floer32
Copy link

floer32 commented May 5, 2019

Related to @Victor-Savu ‘s comment: #571

@floer32
Copy link

floer32 commented May 5, 2019

I could see the utility in your suggestion @darrenleeweber ; though maybe, “poetry shell --exit”? I don’t think it needs another top-level command. Then if Poetry-subshell was not already active, it can print a warning, but still exit-0-OK.

@carlosperate
Copy link

I would like this feature as well, either poetry shell --exit, poetry env exit, or something along those lines would do.

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@stale
Copy link

stale bot commented Nov 20, 2019

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants