-
Notifications
You must be signed in to change notification settings - Fork 109
fix(installer/runtime): honor CODEX_BIN_DIR everywhere #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes hardcoded ~/.local/bin assumptions throughout the codebase to properly honor the CODEX_BIN_DIR environment variable for custom installation paths. It is stacked on top of PR #70 which changes request ID format.
Changes:
- Replaced hardcoded
~/.local/binpaths with dynamic resolution usingCODEX_BIN_DIRenvironment variable - Added helper functions to locate bin directories and scripts using consistent priority orders (env vars, PATH, defaults)
- Updated tmux configuration to use injected bin directory path via template replacement
- Updated documentation with examples that reference
CODEX_BIN_DIRfor troubleshooting
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/completion_hook.py | Added dynamic script path resolution using CODEX_BIN_DIR, CODEX_INSTALL_PREFIX, and PATH lookups |
| lib/ccb_protocol.py | Changed request ID format to 32-hex (from PR #70); added backward-compatible regex patterns |
| config/tmux-ccb.conf | Added tmux keybindings using @ccb_bin_dir variable; updated comments to reference CODEX_BIN_DIR |
| ccb | Added _get_bin_dir() and _find_helper_script() helper functions; updated _set_tmux_theme() and _detect_cca() to use dynamic paths |
| bin/ccb-completion-hook | Updated find_ask_command() and session file search to use CODEX_BIN_DIR and CODEX_INSTALL_PREFIX |
| README.md | Updated troubleshooting section to reference CODEX_BIN_DIR instead of hardcoded ~/.local/bin |
| README_zh.md | Updated troubleshooting section to reference CODEX_BIN_DIR instead of hardcoded ~/.local/bin |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return Path.home() / ".local" / "bin" | ||
|
|
||
|
|
||
| def _find_helper_script(name: str) -> Path | None: |
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type annotation Path | None requires Python 3.10+ or the from __future__ import annotations import. The ccb file is missing this import, which will cause a syntax error on Python 3.7-3.9. Add from __future__ import annotations at the top of the file, following the pattern used in other Python files in this codebase (e.g., lib/completion_hook.py, lib/ccb_protocol.py).
b4ae378 to
35114a5
Compare
35114a5 to
4d4995a
Compare
Summary
Remove runtime and installer assumptions about ~/.local/bin so custom CODEX_BIN_DIR works end-to-end.
Changes
Testing