Commit aeba636
committed
fix(codex): add version_command for uv tool list detection
Problem:
- codex upgrade appears successful but reports "version unchanged"
- Running codex --version starts web server and hangs
- Version detection times out waiting for command to exit
- Tool installed via uv tool but version undetectable
Root cause:
- codex is a web server application, not a CLI utility
- Default --version flag launches full HTTP server on port 9810
- Standard version detection hangs indefinitely
- Catalog notes mentioned issue but no solution implemented
Solution:
- Add version_command: "uv tool list | grep '^codex ' | awk '{print $2}'"
- Query uv tool registry instead of running binary
- Returns version without starting server
- Command exits immediately with clean output
Technical details:
- uv tool list shows: "codex v1.8.17"
- Grep isolates codex line, awk extracts version field
- Detection uses same version_command fallback as ruby-build
- Works for all uv-installed tools with non-standard version flags
Verification:
- codex: installed 1.8.17 === latest 1.8.17 ✅
- No server startup during version check
- Upgrade detection now accurate1 parent 2e32ad8 commit aeba636
2 files changed
Lines changed: 14 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
0 commit comments