Commit 2e32ad8
committed
feat(version-detection): support version_command for tools without PATH binaries
Problem:
- ruby-build fails with "version unchanged" after successful git update
- Installed as rbenv plugin at ~/.rbenv/plugins/ruby-build (not in PATH)
- Detection only works for binaries found via which/PATH
- github_clone installer updates git repo but version detection fails
Changes:
- Add version_command field to ruby-build catalog
- Extracts version from git commit message
- Command: cd ~/.rbenv/plugins/ruby-build && git log -1 --format='%s' | grep -oP 'ruby-build \\K[0-9]+'
- Modify cli_audit/detection.py audit_tool_installation()
- Check version_command independently when no binary path found
- Add fallback version detection for non-PATH tools
- Mark path as "<version_command>" for install_method tracking
Resolution:
- ruby-build: installed 20251023 === latest 20251023
- Version detection working for plugin-based github_clone tools
- Upgrade warnings no longer trigger incorrectly
Technical details:
- version_command executed via shell when binary not in PATH
- Supports git-based versioning, file parsing, custom commands
- Catalog-driven: works for any tool with version_command field1 parent ac664b2 commit 2e32ad8
3 files changed
Lines changed: 23 additions & 1004 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
318 | 325 | | |
319 | 326 | | |
320 | 327 | | |
| |||
323 | 330 | | |
324 | 331 | | |
325 | 332 | | |
326 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
327 | 339 | | |
328 | 340 | | |
0 commit comments