Skip to content

fix(cli): reliable -v / -V / --version and early exit - #59

Closed
Skeyelab wants to merge 1 commit into
mainfrom
fix/version-cli-flags
Closed

Skeyelab wants to merge 1 commit into
mainfrom
fix/version-cli-flags

Conversation

@Skeyelab

@Skeyelab Skeyelab commented May 4, 2026

Copy link
Copy Markdown
Member

Problem

omarchy-wled -v can fail to show the version if something before flag.Parse misbehaves, and common forms like --version / -V were easy to miss.

Change

  • Early exit when argv contains exact tokens -v, -V, -version, or --version (after the tui subcommand branch), so we print version and exit before config load.
  • -V registered on the flag set (alias of -v / -version).

Tests

argsRequestVersion coverage; -V in parseArgs.

Verify locally

go test ./... · go vet ./...

Early exit avoids relying on flag.Parse alone; matches common GNU-style version tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Skeyelab Skeyelab closed this May 4, 2026
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.

1 participant