install.sh: `exec 9>&- 2>/dev/null` in `release_install_lock` silences every later warning
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 82/100
Línea de trabajo
El error está en release_install_lock en install.sh, donde exec 9>&- 2>/dev/null redirige stderr durante el resto del script. Ejecuta la reproducción del issue (un codex gestionado por npm falso en PATH con CODEX_NON_INTERACTIVE=1) y comprueba con bash -x que la función de bloqueo es donde desaparece stderr. Está terminado cuando la advertencia 'Leaving the existing npm-managed Codex installed' aparece tanto con bash como con sh, sin cambiar cómo se cierra el fd 9.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
After release_install_lock runs, the rest of install.sh writes nothing to stderr. The cause is this line:
release_install_lock() {
...
elif [ "$lock_kind" = "flock" ] || [ "$lock_kind" = "lockf" ]; then
exec 9>&- 2>/dev/null || true
In bash, exec with redirections and no command applies all of them to the shell itself, so 2>/dev/null stays in
force for the rest of the script, not only for closing fd 9. Every warn after that point goes to /dev/null. The
same happens under sh (dash on Ubuntu), which the documented curl -fsSL https://chatgpt.com/codex/install.sh | sh
uses.
What a user misses
handle_conflicting_install runs after release_install_lock. With another Codex on the PATH (an npm copy) and the
uninstall question answered No (or CODEX_NON_INTERACTIVE=1), the user never sees:
WARNING: Leaving the existing npm-managed Codex installed. PATH order will determine which codex runs.
The "Failed to uninstall the existing … Codex" warning after a Yes would be hidden the same way.
How to reproduce (Ubuntu 24.04 in Docker, Codex 0.166.0, install.sh sha256
44ac252c1b9a68c02bdf0de8e1c6cbfde36fc1afa8684624962eae7d4c461e70)
docker run --rm -it ubuntu:24.04 bash
apt-get update && apt-get install -y curl ca-certificates
useradd -m tester && su - tester
mkdir -p ~/.npm-global/bin
printf '#!/usr/bin/env node\n' > ~/.npm-global/bin/codex && chmod +x ~/.npm-global/bin/codex
curl -fsSL https://chatgpt.com/codex/install.sh -o install.sh
CODEX_NON_INTERACTIVE=1 PATH="$HOME/.npm-global/bin:$HOME/.local/bin:$PATH" bash install.sh
The output shows "Detected existing npm-managed Codex at /home/tester/.npm-global/bin/codex" and "installed
successfully", but no "Leaving the existing npm-managed Codex installed" line. bash -x install.sh shows
release_install_lock running exec 9>&- 2>/dev/null, and nothing more traced after it.
Run as written above on a clean ubuntu:24.04 container on 2026-11-02 (the same sha256): exit 0, no "Leaving …" line.
A possible fix
Close the descriptor without touching stderr, for example exec 9>&- alone, or { exec 9>&-; } 2>/dev/null. Both
keep stderr working afterwards in bash (checked); exec 9>&- 2>/dev/null silences it in bash and in dash.
- Lenguaje dominante
- Rust
- Estrellas
- 133k
- Forks
- 21.1k
- Merge medio
- 1 min
- PR fusionados (30 d)
- 997
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openai/codex
-
app bug pets
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
bug config hooks
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openai/codex#60103 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
app bug windows-os
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
app documentation windows-os
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug skills
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
Todos los issues de openai/codex
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aosama/astronomical#1973 ·
Los mantenedores suelen responder en 1 día
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 6 días
-
complexity: high external-contributors test
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Meet-hybrid/soroban-forge#584 ·
Los mantenedores suelen responder en 1 día
-
chore(roles): record Elixir bare atom/keyword as StringLit excludes instead of coverage debtAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dekobon/big-code-analysis#1859 ·
Los mantenedores suelen responder en 1 día
-
area:server needs-triage P3
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
agent-of-empires/agent-of-empires#5490 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día