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

Stop delete force failing when virtualenv does not exist #330

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

eganjs
Copy link
Contributor

@eganjs eganjs commented Nov 21, 2019

When pyenv virtualenv-delete -f non-existent-virtualenv is run then an error message is displayed and the return code is 1

This is contrary to the behavior described by pyenv virtualenv-delete --help:

Usage: pyenv virtualenv-delete [-f|--force] <virtualenv>

   -f  Attempt to remove the specified virtualenv without prompting
       for confirmation. If the virtualenv does not exist, do not
       display an error message.

See `pyenv virtualenvs` for a complete list of installed versions.

Specifically for the force flag: If the virtualenv does not exist, do not display an error message.

This PR addresses this by checking that the force flag is not set before continuing with standard behavior (displaying the error message and returning the non-zero code).

@eganjs eganjs requested review from chrahunt and joshfriend January 18, 2020 14:34
@eganjs eganjs requested a review from yyuu February 19, 2020 22:47
@native-api native-api merged commit 7932bb4 into pyenv:master Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants