mirror of
https://github.com/openai/codex.git
synced 2026-09-05 15:18:41 +00:00
26 lines
653 B
Python
26 lines
653 B
Python
"""Fetch the patched zsh fork used by shell_zsh_fork."""
|
|
|
|
from pathlib import Path
|
|
|
|
from .dotslash import fetch_dotslash_executable
|
|
from .targets import REPO_ROOT
|
|
from .targets import TargetSpec
|
|
|
|
|
|
ZSH_MANIFEST = REPO_ROOT / "scripts" / "codex_package" / "codex-zsh"
|
|
ZSH_RESOURCE_PATH = Path("zsh") / "bin" / "zsh"
|
|
|
|
|
|
def resolve_zsh_bin(
|
|
spec: TargetSpec,
|
|
manifest_path: Path | None = None,
|
|
) -> Path | None:
|
|
return fetch_dotslash_executable(
|
|
spec,
|
|
manifest_path=manifest_path or ZSH_MANIFEST,
|
|
artifact_label="codex-zsh",
|
|
cache_key=f"{spec.target}-zsh",
|
|
dest_name="zsh",
|
|
missing_ok=True,
|
|
)
|