You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash when ~/.pyenv directory doesn't exist: ENOENT in sandbox setup #45
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:
functionYRe(){return[Ef,`${process.env.HOME}/.pyenv`]}ThesepathsarethenpassedtorealpathSync()withoutcheckingif they exist:
param:`-DWRITABLE_ROOT_${E}=${HRe(A)}`// HRe = realpathSyncThiscrashesif.pyenvisnotinstalledonthesystem.
Activity