Skip to content

Commit 6067d21

Browse files
committed
Resolve Windows script directory
Locate the installed console launcher through Python's configured scripts directory. This preserves the Unix behavior while matching the standard Scripts layout on Windows hosted runners.
1 parent 5170d85 commit 6067d21

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/test_cli.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import json
88
import subprocess
99
import sys
10+
import sysconfig
1011
from collections.abc import Callable
1112
from dataclasses import dataclass
1213
from pathlib import Path
@@ -88,7 +89,7 @@ def _invoke_terminal(args: list[str], *lines: str) -> _Result:
8889

8990
def _installed_cli() -> Path:
9091
suffix = ".exe" if sys.platform == "win32" else ""
91-
return Path(sys.executable).with_name(f"codex32{suffix}")
92+
return Path(sysconfig.get_path("scripts")) / f"codex32{suffix}"
9293

9394

9495
def _output_artifacts(result: _Result, profile: str = "ms") -> list[Share | Secret]:

0 commit comments

Comments
 (0)