mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## What changed - Add `just assemble-codex-package` as the documented entry point for the package builder. - Export `CODEX_REPO_ROOT` from `just` and release CI, and require the package builder to use it for repository-relative inputs. - Resolve the ripgrep and zsh manifests relative to their Python modules. GitOrigin-RevId: 039d12107a49171f064b0119adc6b99cf97c6c1e
29 lines
768 B
Python
29 lines
768 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 TargetSpec, resolve_input_path
|
|
|
|
ZSH_MANIFEST = Path(__file__).with_name("codex-zsh")
|
|
ZSH_RESOURCE_PATH = Path("zsh") / "bin" / "zsh"
|
|
|
|
|
|
def resolve_zsh_bin(
|
|
spec: TargetSpec,
|
|
manifest_path: Path | None = None,
|
|
*,
|
|
zsh_bin: Path | None = None,
|
|
) -> Path | None:
|
|
if zsh_bin is not None:
|
|
return resolve_input_path(zsh_bin, "zsh executable", "--zsh-bin")
|
|
|
|
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,
|
|
)
|