You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a new venv with python 3.12 (RHEL8 or RHEL9, python 3.12.1, venvctrl 0.8.0), the activate script contains 2 occurence of "VIRTUAL_ENV" export :
The root cause ended up being a bug in the regular expression pattern used to find the first occurrence of VIRTUAL_ENV= and capture the assigned value. The code was already supposed to rewrite multiple occurrences but the extracted path value only ever matched a single occurrence. One issue is that the regular expression matched on ^ *export VIRTUAL_ENV=["']?(.*)["']?$ which matched the first line in your example and captured the value $(cygpath "/root/test"). It then rewrote all occurrences of that value to the new path but there is only one occurrence. The pattern was meant to match the second example and result in /root/test as the captured value. There were two other, smaller bugs in the pattern as well. I made a patch to fix this here: #36
Hi,
When creating a new venv with python 3.12 (RHEL8 or RHEL9, python 3.12.1, venvctrl 0.8.0), the activate script contains 2 occurence of "VIRTUAL_ENV" export :
Running a relocate seems to only replace the first occurence :
The line
venvctrl/venvctrl/venv/base.py
Line 306 in f3a5035
Regards,
The text was updated successfully, but these errors were encountered: