forked from openai/codex
-
Notifications
You must be signed in to change notification settings - Fork 189
Open
Description
open-codex crashes with ENOENT: no such file or directory when the ~/.pyenv directory
doesn't exist on the system.
Environment
- open-codex version: 0.1.31
- Node.js: v22.21.1
- OS: macOS (arm64)
Error
Error: ENOENT: no such file or directory, lstat '/Users/username/.pyenv'
at realpathSync (node:fs:2786:29)
at file:///.../open-codex/dist/cli.js:410:3516
at Array.map ()
at Yae (file:///.../open-codex/dist/cli.js:410:3425)
Root Cause
In cli.js, the YRe() function returns a hardcoded list of directories including
~/.pyenv:
function YRe(){return[Ef,`${process.env.HOME}/.pyenv`]}
These paths are then passed to realpathSync() without checking if they exist:
param:`-DWRITABLE_ROOT_${E}=${HRe(A)}` // HRe = realpathSync
This crashes if .pyenv is not installed on the system.Metadata
Metadata
Assignees
Labels
No labels