From 6f4501ca21368992cb3bc1d1027d78b123d7129e 2021-09-20 22:13:44 From: Mithil Poojary Date: 2021-09-20 22:13:44 Subject: [PATCH] Restore cygwin path check --- diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 05bd8ee..d3389a8 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -921,7 +921,11 @@ class InteractiveShell(SingletonConfigurable): while p.is_symlink(): p = Path(os.readlink(p)) paths.append(p.resolve()) - + + # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible + if str(p_venv).startswith("\\cygdrive"): + p_venv = "C:" / Path(str(p_venv)[11:]) + if any(p_venv == p.parents[1] for p in paths): # Our exe is inside or has access to the virtualenv, don't need to do anything. return