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

More helpful error message when requesting a nonexistent base version #454

Merged
merged 5 commits into from
Apr 10, 2023
Merged

More helpful error message when requesting a nonexistent base version #454

merged 5 commits into from
Apr 10, 2023

Conversation

MarcinKonowalczyk
Copy link
Contributor

Added a more helpful error message for when you're trying to create a virtual environment with python version which is not installed. As a user i keep running into this: i want to make a particular vent but i don't have the python and i have

If I try to install a non-existent python with peen I get something like that:

python-build: definition not found: 3.9.99

See all available versions with `pyenv install --list'.

If the version you need is missing, try upgrading pyenv.

with a possibility of getting even more help by listing all the candidates which contain the version passed and trying to be helpful as to how to upgrade pyenv (implementation form 2.3.17 ca be seen here. This is a bit much to do here so I've just added the 'See all available versions...' line.

@MarcinKonowalczyk MarcinKonowalczyk marked this pull request as ready for review April 6, 2023 18:03
@MarcinKonowalczyk
Copy link
Contributor Author

I've run the tests with bats ./test and they're all ok. I was honestly expecting bats ./test/python.bats to fail on the 3rd test, but it didn't, and i don't know enough about bats to check whether its a proper behaviour or not.

bin/pyenv-virtualenv Outdated Show resolved Hide resolved
bin/pyenv-virtualenv Outdated Show resolved Hide resolved
@MarcinKonowalczyk
Copy link
Contributor Author

also run bats ./test and all tests pass

@native-api native-api merged commit 85d8c5a into pyenv:master Apr 10, 2023
@MarcinKonowalczyk MarcinKonowalczyk deleted the error-message branch April 11, 2023 00:18
@native-api native-api changed the title More helpful error message More helpful error message when requesting a nonexistent base version Jul 28, 2023
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.

None yet

2 participants