##// END OF EJS Templates
Backport PR #13153: Adapt to all sorts of drive names for cygwin
Blazej Michalik -
Show More
@@ -923,8 +923,9 b' class InteractiveShell(SingletonConfigurable):'
923 paths.append(p.resolve())
923 paths.append(p.resolve())
924
924
925 # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible
925 # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible
926 if str(p_venv).startswith("\\cygdrive"):
926 if p_venv.parts[1] == "cygdrive":
927 p_venv = "C:" / Path(str(p_venv)[11:])
927 drive_name = p_venv.parts[2]
928 p_venv = (drive_name + ":/") / Path(*p_venv.parts[3:])
928
929
929 if any(p_venv == p.parents[1] for p in paths):
930 if any(p_venv == p.parents[1] for p in paths):
930 # Our exe is inside or has access to the virtualenv, don't need to do anything.
931 # Our exe is inside or has access to the virtualenv, don't need to do anything.
General Comments 0
You need to be logged in to leave comments. Login now