Skip to content

Commit e86bb0a

Browse files
committed
fix: windows shim detection
Modified: • src/omnipkg/dispatcher.py (+6/-0 lines) [gitship-generated]
1 parent 1a0b526 commit e86bb0a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/omnipkg/dispatcher.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,12 @@ def _collect_all_dispatcher_bin_dirs() -> list:
320320
data = json.loads(registry.read_text(encoding="utf-8"))
321321
for py_exe in data.get("interpreters", {}).values():
322322
adopted_bin = Path(py_exe).parent
323+
# On Windows, managed interpreters have python.exe in root
324+
# but shims live in Scripts/ — check both
325+
if sys.platform == "win32":
326+
scripts_dir = adopted_bin / "Scripts"
327+
if scripts_dir.exists():
328+
adopted_bin = scripts_dir
323329
if adopted_bin.resolve() != native_bin.resolve() and adopted_bin.exists():
324330
dirs.append(adopted_bin)
325331
except Exception:

0 commit comments

Comments
 (0)