Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] '-' not working if in long option #2

Open
pg83 opened this issue Jan 12, 2025 · 3 comments
Open

[bug] '-' not working if in long option #2

pg83 opened this issue Jan 12, 2025 · 3 comments

Comments

@pg83
Copy link

pg83 commented Jan 12, 2025

I have ...,a-b:,... in LongOpts, and it does not work:

--a-b=qw
fatal error: getopt: unrecognized option

without - it works just fine (assume ...,ab:,... in LongOpts):

--ab=qw
@pg83
Copy link
Author

pg83 commented Jan 12, 2025

Or may be I have error when one long option is prefix for another long option?..

@pg83
Copy link
Author

pg83 commented Jan 12, 2025

yes, most definitely

LongOpts: getopt.LongOptStr("target-platform:,host-platform:,host-platform-flag:")

do not work as expected

@jon-codes
Copy link
Owner

Thanks for reporting this, looks like a bug in the option lookup when multiple longopts share a prefix. I can sit down and investigate further later today.

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

No branches or pull requests

2 participants