Repository navigation
feat: add --version flag to CLI - #2
Conversation
Close #1 Assisted-by: Copilot Chat + Big Pickle
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d11dc6ef3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ] = Path("."), | ||
| version: Annotated[ | ||
| bool, | ||
| typer.Option("--version", "-v", help="Show version and exit.", is_eager=True), |
There was a problem hiding this comment.
Make --version short-circuit before workspace validation
When a script requests the version alongside a workspace that no longer exists, such as lode --version -C /missing, Click validates the workspace path and exits with an error before it invokes main, so no version is emitted. is_eager only prioritizes parameter callbacks (Click callback evaluation order); this option has no callback, while the version exit happens later in main. Handle the version exit during eager option processing, or skip workspace validation when it is set.
Useful? React with 👍 / 👎.
Close #1
Assisted-by: Copilot Chat + Big Pickle