Standalone installer ignores ZDOTDIR and leaves codex off PATH in new Zsh sessions

オープン 初心者向け
#61,439 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
shell, zsh

調査の方向性

プロファイルの選択ロジックは scripts/install/install.sh の576〜593行目付近にあります。インストーラーは、PATH を追加する Zsh の起動ファイルをここで選んでいます。まずそこから始めて、HOME にフォールバックする前に ZDOTDIR を優先するように選択を変更してください。issue の再現手順でカスタム ZDOTDIR のマーカーが出力され、新しい対話型の zsh -ic セッションで codex が見つかれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug CLI

With an exported ZDOTDIR, a successful standalone install adds its PATH block to ~/.zshrc. Linux Zsh reads $ZDOTDIR/.zshrc instead. The installer's instruction to open a new terminal and run codex then fails.

Steps to reproduce On Linux with Zsh, start in the Codex checkout. This uses a disposable home and starts with the installation directory off PATH.

installer="$PWD/scripts/install/install.sh"
d=$(mktemp -d)
mkdir -p "$d/home/.config/zsh"
printf 'export CUSTOM_ZSHRC_LOADED=yes\n' > "$d/home/.config/zsh/.zshrc"
env HOME="$d/home" ZDOTDIR="$d/home/.config/zsh" PATH=/usr/bin:/bin \
  SHELL=/bin/zsh CODEX_HOME="$d/codex-home" CODEX_INSTALL_DIR="$d/bin" \
  CODEX_NON_INTERACTIVE=1 sh "$installer"
env HOME="$d/home" ZDOTDIR="$d/home/.config/zsh" PATH=/usr/bin:/bin \
  /bin/zsh -ic 'echo "$CUSTOM_ZSHRC_LOADED"; command -v codex || echo missing'
test -x "$d/bin/codex"

Observed On Linux x86_64 with Zsh 5.9, the checkout's offline release fixture ran the installer at de83e7674a69b9ae18544dd1fbf53f31bfe8c640 to completion. It reported adding PATH to $HOME/.zshrc. A fresh interactive Zsh printed yes and missing, even though the installed executable existed.

Expected A new Zsh session that reads the user's configured startup directory should find the installed CLI.

Suggested fix Use ${ZDOTDIR:-$HOME} when choosing the Zsh startup file. Exercise the startup-file selection with a real interactive Zsh and an exported nondefault ZDOTDIR. Profile selection

主要言語
Rust
スター
135k
フォーク
21.4k
平均マージ
1分
マージ済み PR(30日)
997

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openai/codex のほかの issue

openai/codex の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。