Skip to content

Conversation

cnaples79
Copy link

@cnaples79 cnaples79 commented Oct 7, 2025

Summary

  • normalize global flags before parsing
  • keep passthrough arguments intact by respecting the separator

Rationale

The flag is defined globally, but when users pass it after the subcommand, ArgumentParser throws an "Unknown option" error. Moving global flags to the front preserves the intended UX while maintaining their global scope.

Fixes #360

@jglogan
Copy link
Contributor

jglogan commented Oct 16, 2025

@cnaples79 Thanks for the contribution! Sorry for the delayed response.

We'll still need to review it. I looked it over and it seemed sane though, just want to spend a little more time looking.

The other thing is it looks like you haven't set up commit signatures yet. We can't merge without signed and verified commits. See here for details: https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key#telling-git-about-your-ssh-key

@cnaples79
Copy link
Author

@jglogan thanks for the feedback. I'll update and sign the commits.

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.

[Bug]: "Error: Unknown option '--debug'. Did you mean '--debug'?"

2 participants