hero_browser_server: --help/--version flags ignored, server starts anyway #21
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_browser#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
hero_browser_server --help(and--version,-h,-V) does not print help and exit. Instead, the server starts up and binds its socket/port. Any tool that probes a binary with--helpto discover its CLI surface will accidentally launch a daemon.Reproduction
On a host where 8884 is free, run:
The process keeps running and listens on the configured TCP port and Unix socket. Same for
--version,-h,-V, or any other flag.Root cause
crates/hero_browser_server/src/main.rs:312-318does no argument parsing —main()just constructs the runtime and callsrun_server(false)directly:Expected behavior
--help/-h→ print usage and exit 0.--version/-V→ printhero_browser_server <version>and exit 0.--help, exit 2.Proposed fix
Minimal hand-rolled arg matcher in
main()(no new deps). The binary is intentionally minimal per its module-level doc comment, so a fullclapderive is overkill. ~25 lines.Will open a PR shortly.