detect --apply --json emits invalid JSON (human line after JSON) #25

Open
opened 2026-10-15 11:11:20 +08:00 by Breadway · 0 comments
Owner

Found: full codebase audit 2026-10-15, by reading src/app.rs cmd_detect.
Confidence: high.
Location: src/app.rs:478-490.

With --json --apply, the command prints a {"profile":...} JSON line, then runs flow and calls print_outcome(), which prints a human "connected..." line. A machine consumer parsing stdout as JSON gets two lines, one not JSON.

Suggested fix: under --json, suppress the human line, or emit a single JSON object covering profile plus outcome.

Found: full codebase audit 2026-10-15, by reading src/app.rs cmd_detect. Confidence: high. Location: src/app.rs:478-490. With --json --apply, the command prints a {"profile":...} JSON line, then runs flow and calls print_outcome(), which prints a human "connected..." line. A machine consumer parsing stdout as JSON gets two lines, one not JSON. Suggested fix: under --json, suppress the human line, or emit a single JSON object covering profile plus outcome.
Sign in to join this conversation.
No labels
bug
ci
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/breadcrumbs#25
No description provided.