langgraph-plan-review: replace hardcoded C:\Users\bowei paths with Path.home()/relative resolution
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -77,12 +77,13 @@ def resolve_codex() -> str:
|
||||
if exe and Path(exe).exists():
|
||||
return exe
|
||||
# 2. Known install paths (checked before PATH to avoid picking up wrong codex variant)
|
||||
home = Path.home()
|
||||
for candidate in [
|
||||
r"C:\Users\bowei\miniconda3\envs\langgraph\codex.cmd",
|
||||
r"C:\Users\bowei\.conda\envs\langgraph\codex.cmd",
|
||||
home / "miniconda3" / "envs" / "langgraph" / "codex.cmd",
|
||||
home / ".conda" / "envs" / "langgraph" / "codex.cmd",
|
||||
]:
|
||||
if Path(candidate).exists():
|
||||
return candidate
|
||||
if candidate.exists():
|
||||
return str(candidate)
|
||||
# 3. PATH lookup fallback
|
||||
found = shutil.which("codex") or shutil.which("codex.cmd")
|
||||
if found:
|
||||
|
||||
Reference in New Issue
Block a user