Show More
@@ -772,13 +772,13 b' class InteractiveShell(SingletonConfigurable):' | |||
|
772 | 772 | # stdlib venv may symlink sys.executable, so we can't use realpath. |
|
773 | 773 | # but others can symlink *to* the venv Python, so we can't just use sys.executable. |
|
774 | 774 | # So we just check every item in the symlink tree (generally <= 3) |
|
775 | current_dir = Path(os.curdir).absolute() | |
|
776 | 775 | paths = [p] |
|
777 | 776 | while p.is_symlink(): |
|
778 | os.chdir(p.parent) | |
|
779 |
|
|
|
777 | new_path = p.readlink() | |
|
778 | if not new_path.is_absolute(): | |
|
779 | new_path = p.parent / new_path | |
|
780 | p = new_path | |
|
780 | 781 | paths.append(p) |
|
781 | os.chdir(current_dir) | |
|
782 | 782 | |
|
783 | 783 | # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible |
|
784 | 784 | if p_venv.parts[1] == "cygdrive": |
General Comments 0
You need to be logged in to leave comments.
Login now