Skip to content

Commit 2443340

Browse files
CybotTMclaude
andcommitted
fix(detection): use 'curlie version' subcommand for correct version detection
Fixed curlie version detection to use 'curlie version' subcommand instead of '--version' flag. Problem: Real curlie binary uses 'version' as a subcommand (no dashes): curlie --version → shows curl version (incorrect) curlie version → shows curlie version (correct) Old behavior: $ curlie --version curl 8.5.0 [...] Result: CONFLICT detection or version mismatch New behavior: $ curlie version curlie 1.8.2 (2025-03-07T08:52:36Z) Result: Correct version 1.8.2 detected Detection logic: 1. Try 'curlie version' first → Success if output contains "curlie" 2. Fallback to '--version' → CONFLICT if only shows curl This fixes upgrade prompts showing CONFLICT even after successful curlie installation via 'go install github.com/rs/curlie@latest'. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cbaec5e commit 2443340

2 files changed

Lines changed: 347 additions & 344 deletions

File tree

cli_audit/detection.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,16 @@ def get_version_line(path: str, tool_name: str) -> str:
203203
pass
204204

205205
if tool_name == "curlie":
206-
# Real curlie shows: "curlie 1.8.2\n(curl 8.5.0)"
207-
# Fake/distro curlie shows only: "curl 8.5.0..."
208-
line = run_with_timeout([path, "--version"])
206+
# Real curlie uses "curlie version" subcommand (no dashes)
207+
# Output: "curlie 1.8.2 (2025-03-07T08:52:36Z)"
208+
line = run_with_timeout([path, "version"])
209209
if line and "curlie" in line.lower():
210210
# Real curlie binary
211211
return line
212-
elif line and "curl" in line.lower():
212+
213+
# Fallback: try --version for apt/distro curl symlink
214+
line = run_with_timeout([path, "--version"])
215+
if line and "curl" in line.lower() and "curlie" not in line.lower():
213216
# Fake curlie (apt/distro package) - mark as wrong binary
214217
return "CONFLICT: apt curl masquerading as curlie"
215218
return ""

0 commit comments

Comments
 (0)