Skip to content

Fix for empty string value from pyvenv.cfg parsing #387

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

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

elebertus
Copy link
Contributor

@elebertus elebertus commented Jun 27, 2023

*ini.File.Section.Key will return a zero-length value (string in this case since it's cast to string) which evaluates to an empty env and then envName value.

Here we maintain the same functionality but check if the value is empty, if empty retain the value from VIRTUAL_ENV for env.

This fixes #373

@w33dw0r7d
Copy link

w33dw0r7d commented Oct 20, 2023

@elebertus @scop I think now is perfect time to merge this fix! Please!

zero length string comparison

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
@elebertus
Copy link
Contributor Author

@scop good to go, pulled in your suggestion 👍

@scop
Copy link
Contributor

scop commented Nov 28, 2023

Cheers! However I think we'll need to wait for @justjanne to have a look, I have no commit access here.

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.

No prompt in pyvenv.cfg makes venv incorrectly empty
4 participants