In _detect_env.py:29-30, if the first detector returns a path that doesn't exist, break aborts the entire loop — conda and poetry detectors never get a chance to run:
for detect in detection_funcs:
path = detect()
if not path:
continue
if not path.exists():
break # <-- should be continue
return str(path)
For example, if VIRTUAL_ENV points to a stale/removed directory, the user gets SystemExit even if CONDA_PREFIX is set to a valid environment.
Fix: change break to continue.