Allow mocked Codex preflight sessions

This commit is contained in:
nornen0202 2026-04-08 03:51:18 +09:00
parent 7eae6bc950
commit b9546ba123
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@ def run_codex_preflight(
session_factory: Callable[..., CodexAppServerSession] = CodexAppServerSession,
) -> CodexPreflightResult:
binary = resolve_codex_binary(codex_binary)
if not binary and codex_binary and session_factory is not CodexAppServerSession:
binary = codex_binary
if not binary:
raise CodexAppServerBinaryError(codex_binary_error_message(codex_binary))