##// END OF EJS Templates
Backport PR #13094: Fix virtual environment user warning for lower case pathes
Blazej Michalik -
Show More
@@ -928,6 +928,11 b' class InteractiveShell(SingletonConfigurable):'
928 elif len(str(p_venv)) >= 2 and str(p_venv)[1] == ":":
928 elif len(str(p_venv)) >= 2 and str(p_venv)[1] == ":":
929 p_venv = Path(str(p_venv)[2:])
929 p_venv = Path(str(p_venv)[2:])
930
930
931 if sys.platform == "win32":
932 # On Windows there might be a mixture of lower-case and mixed-case paths
933 p_venv = Path(str(p_venv).lower())
934 paths = [Path(str(p).lower()) for p in paths]
935
931 if any(os.fspath(p_venv) in os.fspath(p) for p in paths):
936 if any(os.fspath(p_venv) in os.fspath(p) for p in paths):
932 # Our exe is inside or has access to the virtualenv, don't need to do anything.
937 # Our exe is inside or has access to the virtualenv, don't need to do anything.
933 return
938 return
General Comments 0
You need to be logged in to leave comments. Login now