fix: resolve codex shim for harness runner
This commit is contained in:
+11
-1
@@ -12,6 +12,7 @@ import fnmatch
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
@@ -373,7 +374,7 @@ class StepExecutor:
|
||||
|
||||
prompt = preamble + step_file.read_text(encoding="utf-8")
|
||||
result = subprocess.run(
|
||||
["codex", "exec", "--dangerously-bypass-approvals-and-sandbox", "--json", "-"],
|
||||
[self._codex_command(), "exec", "--dangerously-bypass-approvals-and-sandbox", "--json", "-"],
|
||||
cwd=self._root, capture_output=True, text=True, input=prompt, timeout=1800,
|
||||
)
|
||||
|
||||
@@ -395,6 +396,15 @@ class StepExecutor:
|
||||
|
||||
# --- 헤더 & 검증 ---
|
||||
|
||||
@staticmethod
|
||||
def _codex_command() -> str:
|
||||
return (
|
||||
shutil.which("codex.cmd")
|
||||
or shutil.which("codex.exe")
|
||||
or shutil.which("codex")
|
||||
or "codex"
|
||||
)
|
||||
|
||||
def _print_header(self):
|
||||
print(f"\n{'='*60}")
|
||||
print(f" Harness Step Executor")
|
||||
|
||||
Reference in New Issue
Block a user