Skip to content

Fix --show flag rejected as unknown in rodney start - #43

Merged
simonw merged 2 commits into
mainfrom
claude/fix-rodney-show-option-eNKzf
Mar 12, 2026
Merged

Fix --show flag rejected as unknown in rodney start#43
simonw merged 2 commits into
mainfrom
claude/fix-rodney-show-option-eNKzf

Conversation

@simonw

@simonw simonw commented Mar 12, 2026

Copy link
Copy Markdown
Owner

The rodney --help output shows rodney start --show as an option, but that using that --show option returns an error, investigate

The first flag-parsing loop in cmdStart only recognized --insecure/-k,
causing --show to hit the default case and exit with "unknown flag" error.
The second loop that handled --show was unreachable.

Extract flag parsing into testable parseStartArgs function that handles
all flags (--show, --insecure, -k) in a single pass. Add tests covering
each flag individually, combined flags, and unknown flag rejection.

https://claude.ai/code/session_019dG8c5MD6DibdiFCXcSq7C

claude added 2 commits March 12, 2026 16:16
The first flag-parsing loop in cmdStart only recognized --insecure/-k,
causing --show to hit the default case and exit with "unknown flag" error.
The second loop that handled --show was unreachable.

Extract flag parsing into testable parseStartArgs function that handles
all flags (--show, --insecure, -k) in a single pass. Add tests covering
each flag individually, combined flags, and unknown flag rejection.

https://claude.ai/code/session_019dG8c5MD6DibdiFCXcSq7C
Port 6 functions to use Go's standard flag package:
- parseStartArgs: --show, --insecure/-k
- cmdReload: --hard
- cmdScreenshot: -w/--width, -h/--height + positional filename
- cmdAXTree: --depth, --json
- cmdAXFind: --name, --role, --json
- cmdAXNode: --json + positional selector (hybrid pre-extraction)

Leave parseAssertArgs and extractScopeArgs as-is because their
flags-anywhere-in-the-arg-list semantics are incompatible with
flag.Parse which stops at the first non-flag argument.

Add findUnknownFlag helper for backward-compatible error messages.

https://claude.ai/code/session_019dG8c5MD6DibdiFCXcSq7C
@simonw
simonw merged commit a842432 into main Mar 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants