mirror of
https://github.com/openai/codex.git
synced 2026-09-06 15:29:32 +00:00
Teach the Codex package builder to fetch the prebuilt zsh fork from a checked-in DotSlash manifest and install it under codex-resources/zsh/bin/zsh when an artifact is available for the package target. Generalize the DotSlash download/cache/verify helper previously embedded in ripgrep packaging so additional checked-in DotSlash manifests can use the same SHA-256 and size validation path. Add install-context support for locating the bundled zsh fork and thread that path through config loading as the lowest-precedence zsh_path default, preserving explicit CLI/profile/global config values. Also avoid preserving platform-specific file metadata when copying executables into the package directory so package smoke tests can use macOS system binaries as inputs.
24 lines
607 B
Python
24 lines
607 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 / "codex-cli" / "bin" / "codex-zsh"
|
|
ZSH_RESOURCE_PATH = Path("zsh") / "bin" / "zsh"
|
|
|
|
|
|
def resolve_zsh_bin(spec: TargetSpec) -> Path | None:
|
|
return fetch_dotslash_executable(
|
|
spec,
|
|
manifest_path=ZSH_MANIFEST,
|
|
artifact_label="codex-zsh",
|
|
cache_key=f"{spec.target}-zsh",
|
|
dest_name="zsh",
|
|
executable=True,
|
|
missing_ok=True,
|
|
)
|