mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
fix code mode host resource installation
This commit is contained in:
@@ -280,9 +280,9 @@ def _validate_codex_package_layout(package_dir: Path, package_archive: Path) ->
|
||||
package_binary = package_dir / "bin" / runtime_binary_name()
|
||||
if not package_binary.is_file():
|
||||
missing_entries.append(str(Path("bin") / runtime_binary_name()))
|
||||
code_mode_host = package_dir / "bin" / runtime_code_mode_host_name()
|
||||
code_mode_host = package_dir / "codex-resources" / runtime_code_mode_host_name()
|
||||
if not code_mode_host.is_file():
|
||||
missing_entries.append(str(Path("bin") / runtime_code_mode_host_name()))
|
||||
missing_entries.append(str(Path("codex-resources") / runtime_code_mode_host_name()))
|
||||
if missing_entries:
|
||||
missing = ", ".join(missing_entries)
|
||||
raise RuntimeError(f"Missing Codex package layout entries in {package_archive}: {missing}")
|
||||
|
||||
@@ -57,7 +57,9 @@ def _write_fake_codex_package(package_dir: Path, script) -> Path:
|
||||
(package_dir / "codex-path").mkdir()
|
||||
(package_dir / "codex-package.json").write_text('{"variant":"codex"}\n')
|
||||
(package_dir / "bin" / script.runtime_binary_name()).write_text("fake codex\n")
|
||||
(package_dir / "bin" / script.runtime_code_mode_host_name()).write_text("fake code mode host\n")
|
||||
(package_dir / "codex-resources" / script.runtime_code_mode_host_name()).write_text(
|
||||
"fake code mode host\n"
|
||||
)
|
||||
(package_dir / "codex-resources" / "bwrap").write_text("fake bwrap\n")
|
||||
(package_dir / "codex-path" / "rg").write_text("fake rg\n")
|
||||
return package_dir
|
||||
@@ -683,7 +685,9 @@ def test_stage_runtime_release_copies_package_layout_and_sets_version(
|
||||
assert {
|
||||
"metadata": (package_root / "codex-package.json").read_text(),
|
||||
"codex": (package_root / "bin" / script.runtime_binary_name()).read_text(),
|
||||
"code_mode_host": (package_root / "bin" / script.runtime_code_mode_host_name()).read_text(),
|
||||
"code_mode_host": (
|
||||
package_root / "codex-resources" / script.runtime_code_mode_host_name()
|
||||
).read_text(),
|
||||
"bwrap": (package_root / "codex-resources" / "bwrap").read_text(),
|
||||
"rg": (package_root / "codex-path" / "rg").read_text(),
|
||||
} == {
|
||||
|
||||
Reference in New Issue
Block a user